diff --git a/src/script_opt/CPP/Compile.h b/src/script_opt/CPP/Compile.h index c15a54a598..0014081476 100644 --- a/src/script_opt/CPP/Compile.h +++ b/src/script_opt/CPP/Compile.h @@ -2,6 +2,7 @@ #pragma once +// Most of these headers are needed for the block of #includes later #include "zeek/Desc.h" #include "zeek/script_opt/CPP/Func.h" #include "zeek/script_opt/CPP/InitsInfo.h" diff --git a/src/script_opt/CPP/Exprs.cc b/src/script_opt/CPP/Exprs.cc index 6d6946fe49..c9ad33122c 100644 --- a/src/script_opt/CPP/Exprs.cc +++ b/src/script_opt/CPP/Exprs.cc @@ -1,8 +1,6 @@ // See the file "COPYING" in the main distribution directory for copyright. -#include "zeek/RE.h" #include "zeek/script_opt/CPP/Compile.h" -#include "zeek/script_opt/ProfileFunc.h" namespace zeek::detail { diff --git a/src/script_opt/CPP/RuntimeInitSupport.h b/src/script_opt/CPP/RuntimeInitSupport.h index 3f50e9f7e9..fb016eb338 100644 --- a/src/script_opt/CPP/RuntimeInitSupport.h +++ b/src/script_opt/CPP/RuntimeInitSupport.h @@ -5,7 +5,6 @@ #pragma once #include "zeek/Val.h" -#include "zeek/script_opt/CPP/AttrExprType.h" #include "zeek/script_opt/CPP/Func.h" namespace zeek { diff --git a/src/script_opt/CPP/RuntimeInits.cc b/src/script_opt/CPP/RuntimeInits.cc index a24a3a6cdb..946d332d0f 100644 --- a/src/script_opt/CPP/RuntimeInits.cc +++ b/src/script_opt/CPP/RuntimeInits.cc @@ -6,6 +6,8 @@ #include "zeek/File.h" #include "zeek/RE.h" #include "zeek/ZeekString.h" +#include "zeek/module_util.h" +#include "zeek/script_opt/CPP/AttrExprType.h" #include "zeek/script_opt/CPP/RuntimeInitSupport.h" using namespace std; diff --git a/src/script_opt/CPP/RuntimeInits.h b/src/script_opt/CPP/RuntimeInits.h index d20f4b7bb5..b547097cb4 100644 --- a/src/script_opt/CPP/RuntimeInits.h +++ b/src/script_opt/CPP/RuntimeInits.h @@ -7,7 +7,6 @@ // associated strategies for dealing with them. #include "zeek/Expr.h" -#include "zeek/module_util.h" #include "zeek/script_opt/CPP/RuntimeInitSupport.h" #pragma once diff --git a/src/script_opt/CPP/Vars.cc b/src/script_opt/CPP/Vars.cc index 69a4248a4c..893a1231a0 100644 --- a/src/script_opt/CPP/Vars.cc +++ b/src/script_opt/CPP/Vars.cc @@ -2,7 +2,6 @@ #include "zeek/script_opt/CPP/Compile.h" #include "zeek/script_opt/IDOptInfo.h" -#include "zeek/script_opt/ProfileFunc.h" namespace zeek::detail { diff --git a/src/script_opt/FuncInfo.cc b/src/script_opt/FuncInfo.cc index 92f382db8f..49bce2d028 100644 --- a/src/script_opt/FuncInfo.cc +++ b/src/script_opt/FuncInfo.cc @@ -2,7 +2,7 @@ #include "zeek/script_opt/FuncInfo.h" -#include +#include namespace zeek::detail { diff --git a/src/script_opt/FuncInfo.h b/src/script_opt/FuncInfo.h index f36601c8b2..f5045f2a19 100644 --- a/src/script_opt/FuncInfo.h +++ b/src/script_opt/FuncInfo.h @@ -4,7 +4,7 @@ #pragma once -#include "zeek/Func.h" +#include namespace zeek::detail { diff --git a/src/script_opt/IDOptInfo.cc b/src/script_opt/IDOptInfo.cc index 9e170a2191..fbec619bf7 100644 --- a/src/script_opt/IDOptInfo.cc +++ b/src/script_opt/IDOptInfo.cc @@ -4,7 +4,6 @@ #include "zeek/Desc.h" #include "zeek/Expr.h" -#include "zeek/Stmt.h" #include "zeek/script_opt/StmtOptInfo.h" namespace zeek::detail { diff --git a/src/script_opt/Inline.cc b/src/script_opt/Inline.cc index d3a932bced..410ceec678 100644 --- a/src/script_opt/Inline.cc +++ b/src/script_opt/Inline.cc @@ -2,7 +2,6 @@ #include "zeek/script_opt/Inline.h" -#include "zeek/Desc.h" #include "zeek/EventRegistry.h" #include "zeek/module_util.h" #include "zeek/script_opt/Expr.h" diff --git a/src/script_opt/ScriptOpt.cc b/src/script_opt/ScriptOpt.cc index 9daf28cbc9..2a3148bb5a 100644 --- a/src/script_opt/ScriptOpt.cc +++ b/src/script_opt/ScriptOpt.cc @@ -5,7 +5,6 @@ #include "zeek/Desc.h" #include "zeek/EventHandler.h" #include "zeek/EventRegistry.h" -#include "zeek/Options.h" #include "zeek/Reporter.h" #include "zeek/module_util.h" #include "zeek/script_opt/CPP/Compile.h" diff --git a/src/script_opt/ScriptOpt.h b/src/script_opt/ScriptOpt.h index f36888272e..ac188cd979 100644 --- a/src/script_opt/ScriptOpt.h +++ b/src/script_opt/ScriptOpt.h @@ -4,9 +4,10 @@ #pragma once -#include #include #include +#include +#include #include "zeek/Expr.h" #include "zeek/Func.h" diff --git a/src/script_opt/UsageAnalyzer.cc b/src/script_opt/UsageAnalyzer.cc index 34360751e2..4ebc11f387 100644 --- a/src/script_opt/UsageAnalyzer.cc +++ b/src/script_opt/UsageAnalyzer.cc @@ -3,7 +3,6 @@ #include "zeek/script_opt/UsageAnalyzer.h" #include "zeek/EventRegistry.h" -#include "zeek/module_util.h" #include "zeek/script_opt/IDOptInfo.h" namespace zeek::detail { diff --git a/src/script_opt/ZAM/Branches.cc b/src/script_opt/ZAM/Branches.cc index bbe1ecf957..1c2ff19247 100644 --- a/src/script_opt/ZAM/Branches.cc +++ b/src/script_opt/ZAM/Branches.cc @@ -2,7 +2,6 @@ // Methods for dealing with ZAM branches. -#include "zeek/Desc.h" #include "zeek/Reporter.h" #include "zeek/script_opt/ZAM/Compile.h" diff --git a/src/script_opt/ZAM/BuiltInSupport.h b/src/script_opt/ZAM/BuiltInSupport.h index f609992b73..340db9f8ab 100644 --- a/src/script_opt/ZAM/BuiltInSupport.h +++ b/src/script_opt/ZAM/BuiltInSupport.h @@ -2,8 +2,12 @@ #pragma once +#include +#include + #include "zeek/Desc.h" -#include "zeek/Expr.h" +#include "zeek/Val.h" +#include "zeek/ZVal.h" namespace zeek::detail { diff --git a/src/script_opt/ZAM/Compile.h b/src/script_opt/ZAM/Compile.h index c7c1f15286..f7ce1eab9c 100644 --- a/src/script_opt/ZAM/Compile.h +++ b/src/script_opt/ZAM/Compile.h @@ -4,7 +4,6 @@ #pragma once -#include "zeek/Event.h" #include "zeek/script_opt/Expr.h" #include "zeek/script_opt/ProfileFunc.h" #include "zeek/script_opt/UseDefs.h" diff --git a/src/script_opt/ZAM/Driver.cc b/src/script_opt/ZAM/Driver.cc index 8a2151a0f1..43b3b1a1c6 100644 --- a/src/script_opt/ZAM/Driver.cc +++ b/src/script_opt/ZAM/Driver.cc @@ -2,12 +2,9 @@ // Driver (and other high-level) methods for ZAM compilation. -#include "zeek/CompHash.h" #include "zeek/Frame.h" -#include "zeek/RE.h" #include "zeek/Reporter.h" #include "zeek/Scope.h" -#include "zeek/module_util.h" #include "zeek/script_opt/ScriptOpt.h" #include "zeek/script_opt/ZAM/Compile.h" diff --git a/src/script_opt/ZAM/Frame.h b/src/script_opt/ZAM/Frame.h index 2be75d48ad..a2ea9e0a7b 100644 --- a/src/script_opt/ZAM/Frame.h +++ b/src/script_opt/ZAM/Frame.h @@ -4,6 +4,12 @@ #pragma once +#include + +#include "zeek/Attr.h" +#include "zeek/ID.h" +#include "zeek/util.h" + namespace zeek::detail { using AttributesPtr = IntrusivePtr; diff --git a/src/script_opt/ZAM/Low-Level.cc b/src/script_opt/ZAM/Low-Level.cc index f064f66ce8..87d3de2057 100644 --- a/src/script_opt/ZAM/Low-Level.cc +++ b/src/script_opt/ZAM/Low-Level.cc @@ -4,7 +4,6 @@ #include "zeek/Desc.h" #include "zeek/Reporter.h" -#include "zeek/script_opt/ScriptOpt.h" #include "zeek/script_opt/ZAM/Compile.h" namespace zeek::detail { diff --git a/src/script_opt/ZAM/Profile.cc b/src/script_opt/ZAM/Profile.cc index 65b8f608b2..abea346517 100644 --- a/src/script_opt/ZAM/Profile.cc +++ b/src/script_opt/ZAM/Profile.cc @@ -2,12 +2,8 @@ #include "zeek/script_opt/ZAM/Profile.h" -#include -#include - #include "zeek/Obj.h" #include "zeek/script_opt/ProfileFunc.h" -#include "zeek/script_opt/ZAM/ZBody.h" namespace zeek::detail { diff --git a/src/script_opt/ZAM/Vars.cc b/src/script_opt/ZAM/Vars.cc index 722da4e158..3d1ef0c781 100644 --- a/src/script_opt/ZAM/Vars.cc +++ b/src/script_opt/ZAM/Vars.cc @@ -4,7 +4,6 @@ #include "zeek/Desc.h" #include "zeek/Reporter.h" -#include "zeek/script_opt/Reduce.h" #include "zeek/script_opt/ZAM/Compile.h" namespace zeek::detail { diff --git a/src/script_opt/ZAM/ZBody.cc b/src/script_opt/ZAM/ZBody.cc index 320bb7c3cf..689f269730 100644 --- a/src/script_opt/ZAM/ZBody.cc +++ b/src/script_opt/ZAM/ZBody.cc @@ -4,11 +4,9 @@ #include "zeek/Conn.h" #include "zeek/Desc.h" -#include "zeek/Dict.h" -#include "zeek/EventHandler.h" +#include "zeek/Event.h" #include "zeek/File.h" #include "zeek/Frame.h" -#include "zeek/IPAddr.h" #include "zeek/OpaqueVal.h" #include "zeek/Overflow.h" #include "zeek/RE.h" diff --git a/src/script_opt/ZAM/ZInst.h b/src/script_opt/ZAM/ZInst.h index cb9c14f584..8f6c43b839 100644 --- a/src/script_opt/ZAM/ZInst.h +++ b/src/script_opt/ZAM/ZInst.h @@ -4,7 +4,6 @@ #pragma once -#include "zeek/script_opt/ZAM/BuiltInSupport.h" #include "zeek/script_opt/ZAM/Support.h" #include "zeek/script_opt/ZAM/ZInstAux.h" #include "zeek/script_opt/ZAM/ZOp.h" diff --git a/src/script_opt/ZAM/ZInstAux.h b/src/script_opt/ZAM/ZInstAux.h index ac7da677f6..262261df4f 100644 --- a/src/script_opt/ZAM/ZInstAux.h +++ b/src/script_opt/ZAM/ZInstAux.h @@ -4,6 +4,7 @@ #pragma once +#include "zeek/Expr.h" #include "zeek/Func.h" #include "zeek/TraverseTypes.h" #include "zeek/script_opt/ZAM/BuiltInSupport.h"