Skip to content

Commit ba73db3

Browse files
committed
Fix include order in util
1 parent ae0ba27 commit ba73db3

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

80 files changed

+105
-104
lines changed

src/util/arith_tools.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ Author: Daniel Kroening, [email protected]
66
77
\*******************************************************************/
88

9+
#include "arith_tools.h"
910

1011
#include <cassert>
1112

@@ -14,8 +15,6 @@ Author: Daniel Kroening, [email protected]
1415
#include "std_types.h"
1516
#include "std_expr.h"
1617

17-
#include "arith_tools.h"
18-
1918
bool to_integer(const exprt &expr, mp_integer &int_value)
2019
{
2120
if(!expr.is_constant())

src/util/array_name.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ Author: Daniel Kroening, [email protected]
1010
/// Misc Utilities
1111

1212
#include "array_name.h"
13+
1314
#include "expr.h"
1415
#include "namespace.h"
1516
#include "symbol.h"

src/util/base_type.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,12 @@ Author: Daniel Kroening, [email protected]
99
/// \file
1010
/// Base Type Computation
1111

12+
#include "base_type.h"
13+
1214
#include <cassert>
1315
#include <set>
1416

1517
#include "std_types.h"
16-
#include "base_type.h"
1718
#include "namespace.h"
1819
#include "symbol.h"
1920

src/util/bv_arithmetic.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ Author: Daniel Kroening, [email protected]
66
77
\*******************************************************************/
88

9+
#include "bv_arithmetic.h"
910

1011
#include <cassert>
1112
#include <ostream>
@@ -14,7 +15,6 @@ Author: Daniel Kroening, [email protected]
1415
#include "arith_tools.h"
1516
#include "std_types.h"
1617
#include "std_expr.h"
17-
#include "bv_arithmetic.h"
1818

1919
typet bv_spect::to_type() const
2020
{

src/util/byte_operators.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ Author: Daniel Kroening, [email protected]
66
77
\*******************************************************************/
88

9+
#include "byte_operators.h"
910

1011
#include <cassert>
1112

12-
#include "byte_operators.h"
1313
#include "config.h"
1414

1515
irep_idt byte_extract_id()

src/util/cmdline.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,12 @@ Author: Daniel Kroening, [email protected]
66
77
\*******************************************************************/
88

9+
#include "cmdline.h"
910

1011
#include <cassert>
1112
#include <cstdlib>
1213
#include <iostream>
1314

14-
#include "cmdline.h"
15-
1615
cmdlinet::cmdlinet()
1716
{
1817
}

src/util/config.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ Author: Daniel Kroening, [email protected]
66
77
\*******************************************************************/
88

9+
#include "config.h"
910

1011
#include <cstdlib>
1112

1213
#include "namespace.h"
13-
#include "config.h"
1414
#include "symbol_table.h"
1515
#include "arith_tools.h"
1616
#include "cmdline.h"

src/util/cout_message.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ Author: Daniel Kroening, [email protected]
66
77
\*******************************************************************/
88

9+
#include "cout_message.h"
910

1011
#include <iostream>
1112

@@ -17,7 +18,6 @@ Author: Daniel Kroening, [email protected]
1718
#endif
1819

1920
#include "unicode.h"
20-
#include "cout_message.h"
2121

2222
cout_message_handlert::cout_message_handlert():
2323
stream_message_handlert(std::cout)

src/util/decision_procedure.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ Author: Daniel Kroening, [email protected]
99
/// \file
1010
/// Decision Procedure Interface
1111

12-
#include <cassert>
13-
1412
#include "decision_procedure.h"
1513

14+
#include <cassert>
15+
1616
bool decision_proceduret::in_core(const exprt &expr)
1717
{
1818
assert(false);

src/util/endianness_map.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@ Author: Daniel Kroening, [email protected]
66
77
\*******************************************************************/
88

9+
#include "endianness_map.h"
910

1011
#include <ostream>
1112
#include <cassert>
1213

1314
#include "std_types.h"
1415
#include "pointer_offset_size.h"
1516
#include "arith_tools.h"
16-
#include "endianness_map.h"
1717
#include "namespace.h"
1818

1919
void endianness_mapt::output(std::ostream &out) const

src/util/expr.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,17 @@ Author: Daniel Kroening, [email protected]
99
/// \file
1010
/// Expression Representation
1111

12+
#include "expr.h"
13+
14+
#include <cassert>
15+
1216
#include <stack>
1317

1418
#include "string2int.h"
1519
#include "mp_arith.h"
1620
#include "fixedbv.h"
1721
#include "ieee_float.h"
1822
#include "invariant.h"
19-
#include "expr.h"
2023
#include "rational.h"
2124
#include "rational_tools.h"
2225
#include "arith_tools.h"

src/util/expr_util.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ Author: Daniel Kroening, [email protected]
88

99

1010
#include "expr_util.h"
11+
1112
#include "expr.h"
1213
#include "fixedbv.h"
1314
#include "ieee_float.h"

src/util/file_util.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ Date: January 2012
1111
/// \file
1212
/// File Utilities
1313

14+
#include "file_util.h"
15+
1416
#include <cerrno>
1517

1618
#if defined(__linux__) || \
@@ -38,8 +40,6 @@ Date: January 2012
3840
#include <cstring>
3941
#endif
4042

41-
#include "file_util.h"
42-
4343
/// \return current working directory
4444
std::string get_current_working_directory()
4545
{

src/util/find_macros.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ Author: Daniel Kroening, [email protected]
66
77
\*******************************************************************/
88

9+
#include "find_macros.h"
910

1011
#include <stack>
1112

12-
#include "find_macros.h"
1313
#include "expr.h"
1414
#include "namespace.h"
1515
#include "symbol.h"

src/util/find_symbols.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,11 @@ Author: Daniel Kroening, [email protected]
66
77
\*******************************************************************/
88

9+
#include "find_symbols.h"
910

1011
#include "std_types.h"
1112
#include "std_expr.h"
1213

13-
#include "find_symbols.h"
14-
1514
enum class kindt { F_TYPE, F_TYPE_NON_PTR, F_EXPR, F_BOTH };
1615

1716
void find_symbols(

src/util/fixedbv.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ Author: Daniel Kroening, [email protected]
66
77
\*******************************************************************/
88

9+
#include "fixedbv.h"
910

1011
#include "std_types.h"
1112
#include "std_expr.h"
12-
#include "fixedbv.h"
1313
#include "arith_tools.h"
1414

1515
fixedbv_spect::fixedbv_spect(const fixedbv_typet &type)

src/util/format_constant.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ Author: Daniel Kroening, [email protected]
88

99

1010
#include "format_constant.h"
11+
1112
#include "arith_tools.h"
1213
#include "fixedbv.h"
1314
#include "ieee_float.h"

src/util/get_module.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,11 @@ Author: Daniel Kroening, [email protected]
99
/// \file
1010
/// Find module symbol using name
1111

12+
#include "get_module.h"
13+
1214
#include <list>
1315
#include <set>
1416

15-
#include "get_module.h"
1617
#include "message.h"
1718
#include "symbol_table.h"
1819

src/util/guard.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,12 @@ Author: Daniel Kroening, [email protected]
99
/// \file
1010
/// Symbolic Execution
1111

12+
#include "guard.h"
13+
1214
#include <ostream>
1315

1416
#include "std_expr.h"
1517
#include "simplify_utils.h"
16-
#include "guard.h"
1718

1819
void guardt::guard_expr(exprt &dest) const
1920
{

src/util/identifier.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,10 @@ Author: Daniel Kroening, [email protected]
66
77
\*******************************************************************/
88

9+
#include "identifier.h"
910

1011
#include <cstring>
1112

12-
#include "identifier.h"
13-
1413
std::string identifiert::as_string() const
1514
{
1615
std::string result;

src/util/ieee_float.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ Author: Daniel Kroening, [email protected]
66
77
\*******************************************************************/
88

9+
#include "ieee_float.h"
910

1011
// <cstdint> is yet to come
1112
#include <stdint.h>
@@ -18,7 +19,6 @@ Author: Daniel Kroening, [email protected]
1819
#include "arith_tools.h"
1920
#include "std_types.h"
2021
#include "std_expr.h"
21-
#include "ieee_float.h"
2222

2323
mp_integer ieee_float_spect::bias() const
2424
{

src/util/irep.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ Author: Daniel Kroening, [email protected]
99
/// \file
1010
/// Internal Representation
1111

12+
#include "irep.h"
13+
1214
#include <ostream>
1315

1416
#include "invariant.h"
15-
1617
#include "string2int.h"
17-
#include "irep.h"
1818
#include "string_hash.h"
1919
#include "irep_hash.h"
2020

src/util/irep_hash_container.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ Author: Daniel Kroening, [email protected]
1010
/// Hashing IREPs
1111

1212
#include "irep_hash_container.h"
13+
1314
#include "irep.h"
1415
#include "irep_hash.h"
1516

src/util/irep_ids.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,10 @@ Author: Daniel Kroening, [email protected]
99
/// \file
1010
/// Internal Representation
1111

12+
#include "irep_ids.h"
13+
1214
#include <cassert>
1315

14-
#include "irep_ids.h"
1516
#include "string_container.h"
1617

1718
const char *irep_ids_table[]=

src/util/irep_serialization.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,11 @@ Date: May 2007
1111
/// \file
1212
/// binary irep conversions with hashing
1313

14+
#include "irep_serialization.h"
15+
1416
#include <sstream>
1517
#include <iostream>
1618

17-
#include "irep_serialization.h"
1819
#include "string_hash.h"
1920

2021
void irep_serializationt::write_irep(

src/util/json.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,10 @@ Author: Daniel Kroening, [email protected]
66
77
\*******************************************************************/
88

9+
#include "json.h"
910

1011
#include <ostream>
1112

12-
#include "json.h"
13-
1413
const jsont jsont::null_json_object(jsont::kindt::J_NULL);
1514

1615
void jsont::escape_string(const std::string &src, std::ostream &out)

src/util/json_expr.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ Author: Peter Schrammel
99
/// \file
1010
/// Expressions in JSON
1111

12+
#include "json_expr.h"
13+
1214
#include "namespace.h"
1315
#include "expr.h"
1416
#include "json.h"
@@ -18,8 +20,6 @@ Author: Peter Schrammel
1820
#include "std_expr.h"
1921
#include "config.h"
2022

21-
#include "json_expr.h"
22-
2323
json_objectt json(const source_locationt &location)
2424
{
2525
json_objectt result;

src/util/json_irep.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,10 @@ Author: Thomas Kiley, [email protected]
99
/// \file
1010
/// Util
1111

12+
#include "json_irep.h"
13+
1214
#include "irep.h"
1315
#include "json.h"
14-
#include "json_irep.h"
1516

1617
#include <algorithm>
1718

src/util/language.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ Author: Daniel Kroening, [email protected]
1010
/// Abstract interface to support a programming language
1111

1212
#include "language.h"
13+
1314
#include "expr.h"
1415

1516
bool languaget::final(symbol_tablet &symbol_table)

src/util/language_file.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ Author: Daniel Kroening, [email protected]
66
77
\*******************************************************************/
88

9+
#include "language_file.h"
910

1011
#include <fstream>
1112

1213
#include "language.h"
13-
#include "language_file.h"
1414

1515
language_filet::language_filet(const language_filet &rhs):
1616
modules(rhs.modules),

0 commit comments

Comments
 (0)