MSVC 2013 does not ICE on this code in the same fashion that MSVC 2012 did; NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229422 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Aaron Ballman 2015-02-16 19:33:36 +00:00
parent b7685c9410
commit 4e521d9500
2 changed files with 2 additions and 5 deletions

View File

@ -385,8 +385,7 @@ static bool isObjectStart(tgtok::TokKind K) {
/// 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,

View File

@ -656,9 +656,7 @@ CodeGenRegisterClass::CodeGenRegisterClass(CodeGenRegBank &RegBank, Record *R)
// 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");