Replace unreachable() with assert(false)

This commit is contained in:
2025-04-20 11:20:04 +02:00
parent c99237fd9c
commit 09ad85b058
7 changed files with 104 additions and 25 deletions

View File

@ -249,4 +249,19 @@ namespace elna::gcc
return label_decl;
}
tree extract_constant(tree expression)
{
int code = TREE_CODE(expression);
if (code == CONST_DECL)
{
return DECL_INITIAL(expression);
}
else if (TREE_CODE_CLASS(code) == tcc_constant)
{
return expression;
}
return NULL_TREE;
}
}