[llvm] r229422 - MSVC 2013 does not ICE on this code in the same fashion that MSVC 2012 did; NFC.
Aaron Ballman
aaron at aaronballman.com
Mon Feb 16 11:33:36 PST 2015
Author: aaronballman
Date: Mon Feb 16 13:33:36 2015
New Revision: 229422
URL: http://llvm.org/viewvc/llvm-project?rev=229422&view=rev
Log:
MSVC 2013 does not ICE on this code in the same fashion that MSVC 2012 did; NFC.
Modified:
llvm/trunk/lib/TableGen/TGParser.cpp
llvm/trunk/utils/TableGen/CodeGenRegisters.cpp
Modified: llvm/trunk/lib/TableGen/TGParser.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/TableGen/TGParser.cpp?rev=229422&r1=229421&r2=229422&view=diff
==============================================================================
--- llvm/trunk/lib/TableGen/TGParser.cpp (original)
+++ llvm/trunk/lib/TableGen/TGParser.cpp Mon Feb 16 13:33:36 2015
@@ -385,8 +385,7 @@ static bool isObjectStart(tgtok::TokKind
/// GetNewAnonymousName - Generate a unique anonymous name that can be used as
/// an identifier.
std::string TGParser::GetNewAnonymousName() {
- unsigned Tmp = AnonCounter++; // MSVC2012 ICEs without this.
- return "anonymous_" + utostr(Tmp);
+ return "anonymous_" + utostr(AnonCounter++);
}
/// ParseObjectName - If an object name is specified, return it. Otherwise,
Modified: llvm/trunk/utils/TableGen/CodeGenRegisters.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/CodeGenRegisters.cpp?rev=229422&r1=229421&r2=229422&view=diff
==============================================================================
--- llvm/trunk/utils/TableGen/CodeGenRegisters.cpp (original)
+++ llvm/trunk/utils/TableGen/CodeGenRegisters.cpp Mon Feb 16 13:33:36 2015
@@ -656,9 +656,7 @@ CodeGenRegisterClass::CodeGenRegisterCla
// Rename anonymous register classes.
if (R->getName().size() > 9 && R->getName()[9] == '.') {
static unsigned AnonCounter = 0;
- R->setName("AnonRegClass_" + utostr(AnonCounter));
- // MSVC2012 ICEs if AnonCounter++ is directly passed to utostr.
- ++AnonCounter;
+ R->setName("AnonRegClass_" + utostr(AnonCounter++));
}
std::vector<Record*> TypeList = R->getValueAsListOfDefs("RegTypes");
More information about the llvm-commits
mailing list