diff options
author | Jim Grosbach <grosbach@apple.com> | 2011-02-03 23:26:36 +0000 |
---|---|---|
committer | Jim Grosbach <grosbach@apple.com> | 2011-02-03 23:26:36 +0000 |
commit | 0ed92f2de3b424416b140eec3df9c9342848bfad (patch) | |
tree | 83590840805a2e97f1c290d6eec5bb735955a794 /utils/TableGen/CodeEmitterGen.cpp | |
parent | 720b918eebfae06dd15dc2e232f51b95a36586f3 (diff) |
Tidy up a bit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124832 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/TableGen/CodeEmitterGen.cpp')
-rw-r--r-- | utils/TableGen/CodeEmitterGen.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/utils/TableGen/CodeEmitterGen.cpp b/utils/TableGen/CodeEmitterGen.cpp index 511d83deb1..957dd19da1 100644 --- a/utils/TableGen/CodeEmitterGen.cpp +++ b/utils/TableGen/CodeEmitterGen.cpp @@ -206,7 +206,6 @@ void CodeEmitterGen::run(raw_ostream &o) { 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 @@ void CodeEmitterGen::run(raw_ostream &o) { 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 @@ void CodeEmitterGen::run(raw_ostream &o) { 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; |