CommandLineInterface: Display an error instead of crashing when assembly variant has no Ewasm translation

This commit is contained in:
Kamil Śliwak
2020-05-30 03:09:42 +02:00
parent 0a71e41501
commit ef133aa670
6 changed files with 13 additions and 0 deletions
+6
View File
@@ -1172,6 +1172,12 @@ bool CommandLineInterface::processInput()
endl;
return false;
}
if (targetMachine == Machine::Ewasm && inputLanguage != Input::StrictAssembly && inputLanguage != Input::Ewasm)
{
serr() << "The selected input language is not directly supported when targeting the Ewasm machine ";
serr() << "and automatic translation is not available." << endl;
return false;
}
serr() <<
"Warning: Yul is still experimental. Please use the output with care." <<
endl;