[NFC] Workaround MSVC2019 32-bit compiler crash

As reported on D100492, this restructuring should stop the internal
compiler error from happening.

Fixes PR50128.
This commit is contained in:
Sven van Haastregt 2021-04-27 11:15:47 +01:00
parent 4a9bc59867
commit 37bc1dc987
1 changed files with 6 additions and 5 deletions

View File

@ -525,17 +525,18 @@ void BuiltinNameEmitter::EmitBuiltinTable() {
for (const auto &Overload : SLM.second.Signatures) {
StringRef ExtName = Overload.first->getValueAsDef("Extension")->getName();
unsigned int MinVersion =
Overload.first->getValueAsDef("MinVersion")->getValueAsInt("ID");
unsigned int MaxVersion =
Overload.first->getValueAsDef("MaxVersion")->getValueAsInt("ID");
OS << " { " << Overload.second << ", "
<< Overload.first->getValueAsListOfDefs("Signature").size() << ", "
<< (Overload.first->getValueAsBit("IsPure")) << ", "
<< (Overload.first->getValueAsBit("IsConst")) << ", "
<< (Overload.first->getValueAsBit("IsConv")) << ", "
<< FunctionExtensionIndex[ExtName] << ", "
<< EncodeVersions(Overload.first->getValueAsDef("MinVersion")
->getValueAsInt("ID"),
Overload.first->getValueAsDef("MaxVersion")
->getValueAsInt("ID"))
<< " },\n";
<< EncodeVersions(MinVersion, MaxVersion) << " },\n";
Index++;
}
}