mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
restructured tracking of initializations of globals for script compilation
This commit is contained in:
parent
0d5c669c1c
commit
1af905a14f
5 changed files with 80 additions and 32 deletions
|
@ -102,7 +102,6 @@
|
|||
#include "zeek/zeekygen/Manager.h"
|
||||
#include "zeek/module_util.h"
|
||||
#include "zeek/IntrusivePtr.h"
|
||||
#include "zeek/script_opt/IDOptInfo.h"
|
||||
|
||||
extern const char* filename; // Absolute path of file currently being parsed.
|
||||
extern const char* last_filename; // Absolute path of last file parsed.
|
||||
|
@ -321,8 +320,6 @@ static void build_global(ID* id, Type* t, InitClass ic, Expr* e,
|
|||
|
||||
add_global(id_ptr, std::move(t_ptr), ic, e_ptr, std::move(attrs_ptr), dt);
|
||||
|
||||
id->GetOptInfo()->AddInitExpr(e_ptr);
|
||||
|
||||
if ( dt == VAR_REDEF )
|
||||
zeekygen_mgr->Redef(id, ::filename, ic, std::move(e_ptr));
|
||||
else
|
||||
|
@ -342,8 +339,6 @@ static StmtPtr build_local(ID* id, Type* t, InitClass ic, Expr* e,
|
|||
auto init = add_local(std::move(id_ptr), std::move(t_ptr), ic,
|
||||
e_ptr, std::move(attrs_ptr), dt);
|
||||
|
||||
id->GetOptInfo()->AddInitExpr(std::move(e_ptr));
|
||||
|
||||
if ( do_coverage )
|
||||
script_coverage_mgr.AddStmt(init.get());
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue