Skip to content

Commit

Permalink
Make sure all headers do #pragma once. (#6188)
Browse files Browse the repository at this point in the history
  • Loading branch information
waywardmonkeys authored Jul 23, 2022
1 parent 3a8eb1e commit 3e38bbb
Show file tree
Hide file tree
Showing 41 changed files with 68 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/api/z3_logger.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ Module Name:
Notes:
--*/
#pragma once

#include "util/symbol.h"

void R();
Expand Down
2 changes: 1 addition & 1 deletion src/api/z3_macros.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Copyright (c) 2015 Microsoft Corporation
--*/

#pragma once

#ifndef Z3_API
# ifdef __GNUC__
Expand Down
2 changes: 2 additions & 0 deletions src/ast/rewriter/bit_blaster/bit_blaster_tpl_def.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ Module Name:
Revision History:
--*/
#pragma once

#include "util/rational.h"
#include "util/common_msgs.h"
#include "ast/rewriter/bit_blaster/bit_blaster_tpl.h"
Expand Down
1 change: 1 addition & 0 deletions src/ast/rewriter/poly_rewriter_def.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Module Name:
Notes:
--*/
#pragma once

#include "util/container_util.h"
#include "ast/rewriter/poly_rewriter.h"
Expand Down
2 changes: 2 additions & 0 deletions src/ast/rewriter/rewriter_def.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ Module Name:
Notes:
--*/
#pragma once

#include "ast/rewriter/rewriter.h"
#include "ast/ast_smt2_pp.h"
#include "ast/ast_ll_pp.h"
Expand Down
1 change: 1 addition & 0 deletions src/cmd_context/extra_cmds/subpaving_cmds.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ Module Name:
Notes:
--*/
#pragma once

class cmd_context;

Expand Down
2 changes: 2 additions & 0 deletions src/math/dd/pdd_eval.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ Module Name:
Revision History:
--*/
#pragma once

#include "math/dd/dd_pdd.h"

namespace dd {
Expand Down
2 changes: 2 additions & 0 deletions src/math/dd/pdd_interval.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ Module Name:
Revision History:
--*/
#pragma once

#include "math/dd/dd_pdd.h"
#include "math/interval/dep_intervals.h"

Expand Down
2 changes: 2 additions & 0 deletions src/math/lp/binary_heap_priority_queue_def.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ Revision History:
--*/
#pragma once

#include "util/vector.h"
#include "math/lp/binary_heap_priority_queue.h"
namespace lp {
Expand Down
1 change: 1 addition & 0 deletions src/math/lp/binary_heap_upair_queue_def.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ Revision History:
--*/
#pragma once

#include <set>
#include "math/lp/lp_utils.h"
Expand Down
2 changes: 2 additions & 0 deletions src/math/lp/core_solver_pretty_printer_def.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ Revision History:
--*/
#pragma once

#include <limits>
#include <string>
#include <algorithm>
Expand Down
2 changes: 2 additions & 0 deletions src/math/lp/dense_matrix_def.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ Revision History:
--*/
#pragma once

#include "math/lp/lp_settings.h"
#ifdef Z3DEBUG
#include "util/vector.h"
Expand Down
2 changes: 2 additions & 0 deletions src/math/lp/indexed_vector_def.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ Revision History:
--*/
#pragma once

#include "util/vector.h"
#include "math/lp/indexed_vector.h"
#include "math/lp/lp_settings.h"
Expand Down
2 changes: 2 additions & 0 deletions src/math/lp/lar_core_solver_def.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ Revision History:
--*/
#pragma once

#include <string>
#include "util/vector.h"
#include "math/lp/lar_core_solver.h"
Expand Down
2 changes: 2 additions & 0 deletions src/math/lp/lp_core_solver_base_def.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ Revision History:
--*/
#pragma once

#include <set>
#include <string>
#include "util/vector.h"
Expand Down
2 changes: 2 additions & 0 deletions src/math/lp/lp_dual_core_solver_def.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ Revision History:
--*/
#pragma once

#include <algorithm>
#include <string>
#include "util/vector.h"
Expand Down
2 changes: 2 additions & 0 deletions src/math/lp/lp_dual_simplex_def.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ Revision History:
--*/
#pragma once

#include "math/lp/lp_dual_simplex.h"
namespace lp{

Expand Down
2 changes: 2 additions & 0 deletions src/math/lp/lp_primal_core_solver_def.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ Revision History:
--*/
#pragma once

#include <list>
#include "util/vector.h"
#include <fstream>
Expand Down
2 changes: 2 additions & 0 deletions src/math/lp/lp_primal_core_solver_tableau_def.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ Revision History:
--*/
#pragma once

// this is a part of lp_primal_core_solver that deals with the tableau
#include "math/lp/lp_primal_core_solver.h"
namespace lp {
Expand Down
2 changes: 2 additions & 0 deletions src/math/lp/lp_primal_simplex_def.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ Revision History:
--*/
#pragma once

#include <string>
#include "util/vector.h"
#include "math/lp/lp_primal_simplex.h"
Expand Down
2 changes: 2 additions & 0 deletions src/math/lp/lp_settings_def.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ Revision History:
--*/
#pragma once

#include <cmath>
#include <string>
#include "util/vector.h"
Expand Down
2 changes: 2 additions & 0 deletions src/math/lp/lp_solver_def.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ Revision History:
--*/
#pragma once

#include <string>
#include <algorithm>
#include "util/vector.h"
Expand Down
2 changes: 2 additions & 0 deletions src/math/lp/lu_def.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ Revision History:
--*/
#pragma once

#include <string>
#include <algorithm>
#include <set>
Expand Down
1 change: 1 addition & 0 deletions src/math/lp/matrix_def.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ Revision History:
--*/
#pragma once

#include <cmath>
#include <string>
Expand Down
2 changes: 2 additions & 0 deletions src/math/lp/permutation_matrix_def.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ Revision History:
--*/
#pragma once

#include "util/vector.h"
#include "math/lp/permutation_matrix.h"
namespace lp {
Expand Down
2 changes: 2 additions & 0 deletions src/math/lp/random_updater_def.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ Revision History:
--*/
#pragma once

#include "math/lp/random_updater.h"
#include "math/lp/static_matrix.h"
#include "math/lp/lar_solver.h"
Expand Down
2 changes: 2 additions & 0 deletions src/math/lp/row_eta_matrix_def.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ Revision History:
--*/
#pragma once

#include "util/vector.h"
#include "math/lp/row_eta_matrix.h"
namespace lp {
Expand Down
2 changes: 2 additions & 0 deletions src/math/lp/scaler_def.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ Revision History:
--*/
#pragma once

#include <algorithm>
#include "math/lp/scaler.h"
#include "math/lp/numeric_pair.h"
Expand Down
2 changes: 2 additions & 0 deletions src/math/lp/square_dense_submatrix_def.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ Revision History:
--*/
#pragma once

#include "util/vector.h"
#include "math/lp/square_dense_submatrix.h"
namespace lp {
Expand Down
1 change: 1 addition & 0 deletions src/math/lp/square_sparse_matrix_def.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ Revision History:


--*/
#pragma once

#include "util/vector.h"
#include "math/lp/square_sparse_matrix.h"
Expand Down
2 changes: 2 additions & 0 deletions src/math/lp/static_matrix_def.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ Revision History:


--*/
#pragma once

#include "util/vector.h"
#include <utility>
#include <set>
Expand Down
2 changes: 2 additions & 0 deletions src/math/subpaving/subpaving_t_def.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ Module Name:
Revision History:

--*/
#pragma once

#include "math/subpaving/subpaving_t.h"
#include "math/interval/interval_def.h"
#include "util/buffer.h"
Expand Down
1 change: 1 addition & 0 deletions src/muz/base/dl_boogie_proof.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
Copyright (c) 2015 Microsoft Corporation

--*/
#pragma once

/**

Expand Down
1 change: 1 addition & 0 deletions src/muz/spacer/spacer_legacy_frames.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

Notes: this file is included from the middle of spacer_context.h
*/
#pragma once

class legacy_frames
{
Expand Down
1 change: 1 addition & 0 deletions src/sat/sat_cutset_compute_shift.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
The truth table covers up to 6 inputs, which fits in 64 bits.

--*/
#pragma once

static uint64_t compute_shift(uint64_t x, unsigned code) {
switch (code) {
Expand Down
1 change: 1 addition & 0 deletions src/shell/options.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
Copyright (c) 2015 Microsoft Corporation

--*/
#pragma once


/**
Expand Down
1 change: 1 addition & 0 deletions src/smt/database.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
Copyright (c) 2015 Microsoft Corporation

--*/
#pragma once

static char const g_pattern_database[] =
"(benchmark patterns \n"
Expand Down
1 change: 1 addition & 0 deletions src/smt/theory_pb.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ Module Name:
It performs unit propagation and switches to creating
sorting circuits if it keeps having to propagate (create new clauses).
--*/
#pragma once

#include "smt/smt_theory.h"
#include "ast/pb_decl_plugin.h"
Expand Down
1 change: 1 addition & 0 deletions src/test/lp/argument_parser.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ Revision History:


--*/
#pragma once

#include <unordered_map>
#include <vector>
Expand Down
2 changes: 2 additions & 0 deletions src/test/lp/gomory_test.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#pragma once

namespace lp {
#include "math/lp/lp_utils.h"
struct gomory_test {
Expand Down
1 change: 1 addition & 0 deletions src/util/max_cliques.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ Module Name:


--*/
#pragma once

#include "util/vector.h"
#include "util/uint_set.h"
Expand Down

0 comments on commit 3e38bbb

Please sign in to comment.