support for compiling type-based switches to C++

This commit is contained in:
Vern Paxson 2021-12-23 11:39:58 -08:00
parent c6cd5d7a3b
commit 721d99636e
5 changed files with 103 additions and 10 deletions

View file

@ -45,13 +45,6 @@ bool is_CPP_compilable(const ProfileFunc* pf, const char** reason)
return false;
}
if ( pf->TypeSwitches().size() > 0 )
{
if ( reason )
*reason = "use of type-based \"switch\"";
return false;
}
auto body = pf->ProfiledBody();
if ( body && ! body->GetOptInfo()->is_free_of_conditionals )
{