switch to ID definition regions; reworked driver functions; more info for reporting uncompilable functions

This commit is contained in:
Vern Paxson 2021-08-16 13:10:12 -07:00
parent 83a0d89caf
commit da6ac0b521
15 changed files with 619 additions and 581 deletions

View file

@ -33,13 +33,21 @@ string scope_prefix(int scope)
return scope_prefix(to_string(scope));
}
bool is_CPP_compilable(const ProfileFunc* pf)
bool is_CPP_compilable(const ProfileFunc* pf, const char** reason)
{
if ( pf->NumWhenStmts() > 0 )
{
if ( reason )
*reason = "use of \"when\"";
return false;
}
if ( pf->TypeSwitches().size() > 0 )
{
if ( reason )
*reason = "use of type-based \"switch\"";
return false;
}
return true;
}