diff options
Diffstat (limited to 'utils/TableGen/DAGISelEmitter.cpp')
-rw-r--r-- | utils/TableGen/DAGISelEmitter.cpp | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/utils/TableGen/DAGISelEmitter.cpp b/utils/TableGen/DAGISelEmitter.cpp index 9f0f155a7f..12667d5656 100644 --- a/utils/TableGen/DAGISelEmitter.cpp +++ b/utils/TableGen/DAGISelEmitter.cpp @@ -1604,17 +1604,8 @@ static std::string getLegalCName(std::string OpName) { void DAGISelEmitter::EmitInstructionSelector(std::ostream &OS) { const CodeGenTarget &Target = CGP.getTargetInfo(); - // Get the namespace to insert instructions into. Make sure not to pick up - // "TargetInstrInfo" by accidentally getting the namespace off the PHI - // instruction or something. - std::string InstNS; - for (CodeGenTarget::inst_iterator i = Target.inst_begin(), - e = Target.inst_end(); i != e; ++i) { - InstNS = i->second.Namespace; - if (InstNS != "TargetInstrInfo") - break; - } - + // Get the namespace to insert instructions into. + std::string InstNS = Target.getInstNamespace(); if (!InstNS.empty()) InstNS += "::"; // Group the patterns by their top-level opcodes. |