From 6ae7e0e7223c2abf20aad9d007e95cc8a6c73db4 Mon Sep 17 00:00:00 2001 From: Daniel Kroening Date: Tue, 22 Jan 2019 13:46:48 +0000 Subject: [PATCH] remove #include "mathematical_types.h" from std_expr.h std_expr.h is a frequently used header file; removing the (unused) include from this file has the potential to improve compile times. --- src/analyses/constant_propagator.cpp | 1 + src/ansi-c/c_typecast.cpp | 7 ++++--- src/ansi-c/c_typecheck_expr.cpp | 1 + src/ansi-c/c_typecheck_type.cpp | 1 + src/cpp/cpp_declarator_converter.cpp | 4 ++-- src/cpp/cpp_typecheck_expr.cpp | 1 + src/cpp/cpp_typecheck_resolve.cpp | 1 + src/goto-programs/goto_convert_side_effect.cpp | 1 + src/goto-programs/interpreter.cpp | 1 + src/linking/linking.cpp | 1 + src/solvers/smt2/smt2_parser.h | 1 + src/util/rational_tools.cpp | 2 +- src/util/std_expr.cpp | 1 + src/util/std_expr.h | 1 - unit/analyses/constant_propagator.cpp | 1 + unit/analyses/does_remove_const/does_expr_lose_const.cpp | 9 ++++++--- .../does_type_preserve_const_correctness.cpp | 3 +++ .../does_remove_const/is_type_at_least_as_const_as.cpp | 3 +++ unit/util/std_expr.cpp | 2 ++ 19 files changed, 32 insertions(+), 10 deletions(-) diff --git a/src/analyses/constant_propagator.cpp b/src/analyses/constant_propagator.cpp index 781303d16e..a974914e48 100644 --- a/src/analyses/constant_propagator.cpp +++ b/src/analyses/constant_propagator.cpp @@ -23,6 +23,7 @@ Author: Peter Schrammel #include #include #include +#include #include #include diff --git a/src/ansi-c/c_typecast.cpp b/src/ansi-c/c_typecast.cpp index 11df93a39a..3fb182e27e 100644 --- a/src/ansi-c/c_typecast.cpp +++ b/src/ansi-c/c_typecast.cpp @@ -13,13 +13,14 @@ Author: Daniel Kroening, kroening@kroening.com #include #include +#include #include #include #include -#include -#include -#include +#include #include +#include +#include #include "c_qualifiers.h" diff --git a/src/ansi-c/c_typecheck_expr.cpp b/src/ansi-c/c_typecheck_expr.cpp index ebfba1eb01..aae7fcc2c2 100644 --- a/src/ansi-c/c_typecheck_expr.cpp +++ b/src/ansi-c/c_typecheck_expr.cpp @@ -20,6 +20,7 @@ Author: Daniel Kroening, kroening@kroening.com #include #include #include +#include #include #include #include diff --git a/src/ansi-c/c_typecheck_type.cpp b/src/ansi-c/c_typecheck_type.cpp index 0d1c59810c..6cf9a0d770 100644 --- a/src/ansi-c/c_typecheck_type.cpp +++ b/src/ansi-c/c_typecheck_type.cpp @@ -16,6 +16,7 @@ Author: Daniel Kroening, kroening@kroening.com #include #include #include +#include #include #include diff --git a/src/cpp/cpp_declarator_converter.cpp b/src/cpp/cpp_declarator_converter.cpp index 4e0c135bc4..13b9f4821a 100644 --- a/src/cpp/cpp_declarator_converter.cpp +++ b/src/cpp/cpp_declarator_converter.cpp @@ -11,11 +11,11 @@ Author: Daniel Kroening, kroening@cs.cmu.edu #include "cpp_declarator_converter.h" +#include +#include #include #include -#include - #include "cpp_type2name.h" #include "cpp_typecheck.h" diff --git a/src/cpp/cpp_typecheck_expr.cpp b/src/cpp/cpp_typecheck_expr.cpp index 851b9c9134..cb3a46d607 100644 --- a/src/cpp/cpp_typecheck_expr.cpp +++ b/src/cpp/cpp_typecheck_expr.cpp @@ -20,6 +20,7 @@ Author: Daniel Kroening, kroening@cs.cmu.edu #include #include #include +#include #include #include diff --git a/src/cpp/cpp_typecheck_resolve.cpp b/src/cpp/cpp_typecheck_resolve.cpp index b5357d5659..d89f6af734 100644 --- a/src/cpp/cpp_typecheck_resolve.cpp +++ b/src/cpp/cpp_typecheck_resolve.cpp @@ -20,6 +20,7 @@ Author: Daniel Kroening, kroening@cs.cmu.edu #include #include +#include #include #include #include diff --git a/src/goto-programs/goto_convert_side_effect.cpp b/src/goto-programs/goto_convert_side_effect.cpp index bf2980732c..03969b3e8e 100644 --- a/src/goto-programs/goto_convert_side_effect.cpp +++ b/src/goto-programs/goto_convert_side_effect.cpp @@ -15,6 +15,7 @@ Author: Daniel Kroening, kroening@kroening.com #include #include #include +#include #include #include diff --git a/src/goto-programs/interpreter.cpp b/src/goto-programs/interpreter.cpp index a5295b52b2..3d5e6bd441 100644 --- a/src/goto-programs/interpreter.cpp +++ b/src/goto-programs/interpreter.cpp @@ -21,6 +21,7 @@ Author: Daniel Kroening, kroening@kroening.com #include #include #include +#include #include #include #include diff --git a/src/linking/linking.cpp b/src/linking/linking.cpp index 13e2d7f611..443576e329 100644 --- a/src/linking/linking.cpp +++ b/src/linking/linking.cpp @@ -17,6 +17,7 @@ Author: Daniel Kroening, kroening@kroening.com #include #include +#include #include #include diff --git a/src/solvers/smt2/smt2_parser.h b/src/solvers/smt2/smt2_parser.h index ed485d1d11..237fb0c697 100644 --- a/src/solvers/smt2/smt2_parser.h +++ b/src/solvers/smt2/smt2_parser.h @@ -11,6 +11,7 @@ Author: Daniel Kroening, kroening@kroening.com #include +#include #include #include "smt2_tokenizer.h" diff --git a/src/util/rational_tools.cpp b/src/util/rational_tools.cpp index 0d05635341..fb39d690bc 100644 --- a/src/util/rational_tools.cpp +++ b/src/util/rational_tools.cpp @@ -11,8 +11,8 @@ Author: Daniel Kroening, kroening@kroening.com #include "rational_tools.h" +#include "mathematical_types.h" #include "rational.h" -#include "std_types.h" static mp_integer power10(size_t i) { diff --git a/src/util/std_expr.cpp b/src/util/std_expr.cpp index eca4292220..e21d6d2339 100644 --- a/src/util/std_expr.cpp +++ b/src/util/std_expr.cpp @@ -15,6 +15,7 @@ Author: Daniel Kroening, kroening@kroening.com #include "arith_tools.h" #include "byte_operators.h" #include "c_types.h" +#include "mathematical_types.h" #include "pointer_offset_size.h" bool constant_exprt::value_is_zero_string() const diff --git a/src/util/std_expr.h b/src/util/std_expr.h index 8c8fcb105e..e6882396d3 100644 --- a/src/util/std_expr.h +++ b/src/util/std_expr.h @@ -16,7 +16,6 @@ Author: Daniel Kroening, kroening@kroening.com #include "base_type.h" #include "expr_cast.h" #include "invariant.h" -#include "mathematical_types.h" #include "std_types.h" /// An expression without operands diff --git a/unit/analyses/constant_propagator.cpp b/unit/analyses/constant_propagator.cpp index 59a2411bb6..88f36659ba 100644 --- a/unit/analyses/constant_propagator.cpp +++ b/unit/analyses/constant_propagator.cpp @@ -14,6 +14,7 @@ Author: Diffblue Ltd #include #include +#include #include static bool starts_with_x(const exprt &e, const namespacet &) diff --git a/unit/analyses/does_remove_const/does_expr_lose_const.cpp b/unit/analyses/does_remove_const/does_expr_lose_const.cpp index cf21ef0cf3..07d02ce101 100644 --- a/unit/analyses/does_remove_const/does_expr_lose_const.cpp +++ b/unit/analyses/does_remove_const/does_expr_lose_const.cpp @@ -11,13 +11,16 @@ Author: Diffblue Ltd. #include -#include -#include -#include #include +#include +#include +#include +#include #include + #include + #include #include diff --git a/unit/analyses/does_remove_const/does_type_preserve_const_correctness.cpp b/unit/analyses/does_remove_const/does_type_preserve_const_correctness.cpp index 4b6c6c3e02..0e00f81fa6 100644 --- a/unit/analyses/does_remove_const/does_type_preserve_const_correctness.cpp +++ b/unit/analyses/does_remove_const/does_type_preserve_const_correctness.cpp @@ -12,11 +12,14 @@ Author: Diffblue Ltd. #include #include +#include #include #include #include + #include + #include #include diff --git a/unit/analyses/does_remove_const/is_type_at_least_as_const_as.cpp b/unit/analyses/does_remove_const/is_type_at_least_as_const_as.cpp index 2e54032bd2..d9a91b9409 100644 --- a/unit/analyses/does_remove_const/is_type_at_least_as_const_as.cpp +++ b/unit/analyses/does_remove_const/is_type_at_least_as_const_as.cpp @@ -12,11 +12,14 @@ Author: Diffblue Ltd. #include #include +#include #include #include #include + #include + #include #include diff --git a/unit/util/std_expr.cpp b/unit/util/std_expr.cpp index 359bc53d8c..162ade636f 100644 --- a/unit/util/std_expr.cpp +++ b/unit/util/std_expr.cpp @@ -7,7 +7,9 @@ Author: Diffblue Ltd \*******************************************************************/ #include + #include +#include #include #include