[llvm-commits] [llvm] r124832 - /llvm/trunk/utils/TableGen/CodeEmitterGen.cpp
Jim Grosbach
grosbach at apple.com
Thu Feb 3 15:26:36 PST 2011
Author: grosbach
Date: Thu Feb 3 17:26:36 2011
New Revision: 124832
URL: http://llvm.org/viewvc/llvm-project?rev=124832&view=rev
Log:
Tidy up a bit.
Modified:
llvm/trunk/utils/TableGen/CodeEmitterGen.cpp
Modified: llvm/trunk/utils/TableGen/CodeEmitterGen.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/CodeEmitterGen.cpp?rev=124832&r1=124831&r2=124832&view=diff
==============================================================================
--- llvm/trunk/utils/TableGen/CodeEmitterGen.cpp (original)
+++ llvm/trunk/utils/TableGen/CodeEmitterGen.cpp Thu Feb 3 17:26:36 2011
@@ -206,7 +206,6 @@
if (Target.isLittleEndianEncoding()) reverseBits(Insts);
EmitSourceFileHeader("Machine Code Emitter", o);
- std::string Namespace = Insts[0]->getValueAsString("Namespace") + "::";
const std::vector<const CodeGenInstruction*> &NumberedInstructions =
Target.getInstructionsByEnumValue();
@@ -254,7 +253,8 @@
Record *R = *IC;
if (R->getValueAsString("Namespace") == "TargetOpcode")
continue;
- const std::string &InstName = R->getName();
+ const std::string &InstName = R->getValueAsString("Namespace") + "::"
+ + R->getName();
std::string Case = getInstructionCase(R, Target);
CaseMap[Case].push_back(InstName);
@@ -275,7 +275,7 @@
for (int i = 0, N = InstList.size(); i < N; i++) {
if (i) o << "\n";
- o << " case " << Namespace << InstList[i] << ":";
+ o << " case " << InstList[i] << ":";
}
o << " {\n";
o << Case;
More information about the llvm-commits
mailing list