aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2005-10-18 04:41:01 +0000
committerChris Lattner <sabre@nondot.org>2005-10-18 04:41:01 +0000
commitb277cbc0873bfeeaf8b4a14998da69413ad0678c (patch)
tree4a101d546b1bb4a1c8ca01439cdfc406f2ae0ac7
parent9d2b817fcbad2ee615be323c38f1ed66d81964dc (diff)
Duraid pointed out that it is impolite to emit PPC:: into the IA64 backend
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23780 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--utils/TableGen/DAGISelEmitter.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/utils/TableGen/DAGISelEmitter.cpp b/utils/TableGen/DAGISelEmitter.cpp
index 08af66a64a..46e298b6de 100644
--- a/utils/TableGen/DAGISelEmitter.cpp
+++ b/utils/TableGen/DAGISelEmitter.cpp
@@ -1762,11 +1762,15 @@ namespace {
}
void DAGISelEmitter::EmitInstructionSelector(std::ostream &OS) {
+ std::string InstNS = Target.inst_begin()->second.Namespace;
+ if (!InstNS.empty()) InstNS += "::";
+
// Emit boilerplate.
OS << "// The main instruction selector code.\n"
<< "SDOperand SelectCode(SDOperand N) {\n"
<< " if (N.getOpcode() >= ISD::BUILTIN_OP_END &&\n"
- << " N.getOpcode() < PPCISD::FIRST_NUMBER)\n"
+ << " N.getOpcode() < (ISD::BUILTIN_OP_END+" << InstNS
+ << "INSTRUCTION_LIST_END))\n"
<< " return N; // Already selected.\n\n"
<< " if (!N.Val->hasOneUse()) {\n"
<< " std::map<SDOperand, SDOperand>::iterator CGMI = CodeGenMap.find(N);\n"