[llvm] r176125 - [TableGen] Fix ICE on MSVC 2012 Release builds.
Bill Wendling
wendling at apple.com
Wed Feb 27 11:11:21 PST 2013
On Feb 26, 2013, at 1:29 PM, Michael J. Spencer <bigcheesegs at gmail.com> wrote:
> Author: mspencer
> Date: Tue Feb 26 15:29:47 2013
> New Revision: 176125
>
> URL: http://llvm.org/viewvc/llvm-project?rev=176125&view=rev
> Log:
> [TableGen] Fix ICE on MSVC 2012 Release builds.
>
Please be more explicit about what the problem that you're fixing *is* rather than describing the symptoms of the problem.
-bw
> 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=176125&r1=176124&r2=176125&view=diff
> ==============================================================================
> --- llvm/trunk/lib/TableGen/TGParser.cpp (original)
> +++ llvm/trunk/lib/TableGen/TGParser.cpp Tue Feb 26 15:29:47 2013
> @@ -382,7 +382,8 @@ static bool isObjectStart(tgtok::TokKind
>
> static std::string GetNewAnonymousName() {
> static unsigned AnonCounter = 0;
> - return "anonymous."+utostr(AnonCounter++);
> + unsigned Tmp = AnonCounter++; // MSVC2012 ICEs without this.
> + return "anonymous." + utostr(Tmp);
> }
>
> /// 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=176125&r1=176124&r2=176125&view=diff
> ==============================================================================
> --- llvm/trunk/utils/TableGen/CodeGenRegisters.cpp (original)
> +++ llvm/trunk/utils/TableGen/CodeGenRegisters.cpp Tue Feb 26 15:29:47 2013
> @@ -703,7 +703,9 @@ CodeGenRegisterClass::CodeGenRegisterCla
> // Rename anonymous register classes.
> if (R->getName().size() > 9 && R->getName()[9] == '.') {
> static unsigned AnonCounter = 0;
> - R->setName("AnonRegClass_"+utostr(AnonCounter++));
> + R->setName("AnonRegClass_" + utostr(AnonCounter));
> + // MSVC2012 ICEs if AnonCounter++ is directly passed to utostr.
> + ++AnonCounter;
> }
>
> std::vector<Record*> TypeList = R->getValueAsListOfDefs("RegTypes");
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
More information about the llvm-commits
mailing list