llvm.org GIT mirror llvm / f7560ed
Fix PR1001, patch by Nikhil Patil! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31880 91177308-0d34-0410-b5e6-96231b3b80d8 Chris Lattner 14 years ago
1 changed file(s) with 11 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
34073407 }
34083408
34093409 void DAGISelEmitter::EmitInstructionSelector(std::ostream &OS) {
3410 std::string InstNS = Target.inst_begin()->second.Namespace;
3410 // Get the namespace to insert instructions into. Make sure not to pick up
3411 // "TargetInstrInfo" by accidentally getting the namespace off the PHI
3412 // instruction or something.
3413 std::string InstNS;
3414 for (CodeGenTarget::inst_iterator i = Target.inst_begin(),
3415 e = Target.inst_end(); i != e; ++i) {
3416 InstNS = i->second.Namespace;
3417 if (InstNS != "TargetInstrInfo")
3418 break;
3419 }
3420
34113421 if (!InstNS.empty()) InstNS += "::";
34123422
34133423 // Group the patterns by their top-level opcodes.