mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
-O gen-C++ maintenance: fixes for attributes & initializing globals
This commit is contained in:
parent
6fcbb55ccd
commit
26dae9a5ae
9 changed files with 54 additions and 12 deletions
|
@ -311,8 +311,11 @@ void CPPCompile::RegisterCompiledBody(const string& f)
|
|||
|
||||
void CPPCompile::GenEpilog()
|
||||
{
|
||||
NL();
|
||||
InitializeGlobals();
|
||||
if ( standalone )
|
||||
{
|
||||
NL();
|
||||
InitializeGlobals();
|
||||
}
|
||||
|
||||
NL();
|
||||
for ( const auto& ii : init_infos )
|
||||
|
@ -472,8 +475,11 @@ void CPPCompile::GenFinishInit()
|
|||
NL();
|
||||
Emit("load_BiFs__CPP();");
|
||||
|
||||
NL();
|
||||
Emit("init_globals__CPP();");
|
||||
if ( standalone )
|
||||
{
|
||||
NL();
|
||||
Emit("init_globals__CPP();");
|
||||
}
|
||||
|
||||
EndBlock();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue