mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
some code simplifications and streamlining
This commit is contained in:
parent
18c77ddc2c
commit
79c53c9ed6
11 changed files with 23 additions and 27 deletions
|
@ -491,24 +491,19 @@ static void analyze_scripts_for_ZAM(std::unique_ptr<ProfileFuncs>& pfs)
|
|||
// since it won't be consulted in that case.
|
||||
std::unordered_set<Func*> func_used_indirectly;
|
||||
|
||||
if ( global_stmts )
|
||||
func_used_indirectly.insert(global_stmts.get());
|
||||
|
||||
if ( inl )
|
||||
{
|
||||
if ( global_stmts )
|
||||
func_used_indirectly.insert(global_stmts.get());
|
||||
|
||||
for ( auto& g : pfs->Globals() )
|
||||
{
|
||||
if ( g->GetType()->Tag() != TYPE_FUNC )
|
||||
continue;
|
||||
|
||||
auto v = g->GetVal();
|
||||
if ( ! v )
|
||||
continue;
|
||||
|
||||
auto func = v->AsFunc();
|
||||
|
||||
if ( inl->WasInlined(func) )
|
||||
func_used_indirectly.insert(func);
|
||||
if ( v )
|
||||
func_used_indirectly.insert(v->AsFunc());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue