Added assertion for single primary to shouldTreatAsSIL

This commit is contained in:
David Ungar
2017-12-06 16:00:47 -08:00
parent b63aab533d
commit c6cfa147f3

View File

@@ -48,8 +48,11 @@ bool FrontendInputs::shouldTreatAsSIL() const {
unsigned silPrimaryCount = numberOfPrimaryInputsEndingWith(SIL_EXTENSION);
if (silPrimaryCount == 0)
return false;
if (silPrimaryCount == primaryInputCount())
if (silPrimaryCount == primaryInputCount()) {
// Not clear what to do someday with multiple primaries
assertMustNotBeMoreThanOnePrimaryInput();
return true;
}
llvm_unreachable("Either all primaries or none must end with .sil");
}