mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
"-O use-C++" now fails if no C++ bodies wound up being applicable
This commit is contained in:
parent
34b448ee7b
commit
fb6725a9ce
1 changed files with 7 additions and 0 deletions
|
@ -370,6 +370,8 @@ static void use_CPP()
|
|||
if ( ! CPP_init_hook )
|
||||
reporter->FatalError("no C++ functions available to use");
|
||||
|
||||
int num_used = 0;
|
||||
|
||||
for ( auto& f : funcs )
|
||||
{
|
||||
auto hash = f.Profile()->HashVal();
|
||||
|
@ -377,6 +379,8 @@ static void use_CPP()
|
|||
|
||||
if ( s != compiled_scripts.end() )
|
||||
{
|
||||
++num_used;
|
||||
|
||||
auto b = s->second.body;
|
||||
b->SetHash(hash);
|
||||
|
||||
|
@ -407,6 +411,9 @@ static void use_CPP()
|
|||
}
|
||||
}
|
||||
|
||||
if ( num_used == 0 )
|
||||
reporter->FatalError("no C++ functions found to use");
|
||||
|
||||
// Now that we've loaded all of the compiled scripts
|
||||
// relevant for the AST, activate standalone ones.
|
||||
for ( auto cb : standalone_activations )
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue