mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 22:58:20 +00:00
Maintenance updates for -O gen-C++ / -O gen-standalone-C++
fixes for using BiFs in standalone global initializations avoiding redundant global initializations updates to maintenance scripts and notes removal of an unused member variable
This commit is contained in:
parent
5827e2ce5d
commit
18f4fcb5a4
12 changed files with 77 additions and 38 deletions
|
@ -350,6 +350,11 @@ GlobalInitInfo::GlobalInitInfo(CPPCompile* c, const ID* g, string _CPP_name)
|
|||
|
||||
exported = g->IsExport();
|
||||
val = ValElem(c, nullptr); // empty because we initialize dynamically
|
||||
|
||||
if ( gt->Tag() == TYPE_FUNC && ! g->GetVal() )
|
||||
// Remember this peculiarity so we can recreate it for
|
||||
// error-behavior-compatibility.
|
||||
func_with_no_val = true;
|
||||
}
|
||||
|
||||
void GlobalInitInfo::InitializerVals(std::vector<std::string>& ivs) const
|
||||
|
@ -360,6 +365,7 @@ void GlobalInitInfo::InitializerVals(std::vector<std::string>& ivs) const
|
|||
ivs.push_back(Fmt(attrs));
|
||||
ivs.push_back(val);
|
||||
ivs.push_back(Fmt(exported));
|
||||
ivs.push_back(Fmt(func_with_no_val));
|
||||
}
|
||||
|
||||
CallExprInitInfo::CallExprInitInfo(CPPCompile* c, ExprPtr _e, string _e_name, string _wrapper_class)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue