mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-14 15:28:20 +00:00
Fix PR1001, patch by Nikhil Patil!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31880 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -3408,7 +3408,17 @@ static std::string getLegalCName(std::string OpName) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void DAGISelEmitter::EmitInstructionSelector(std::ostream &OS) {
|
void DAGISelEmitter::EmitInstructionSelector(std::ostream &OS) {
|
||||||
std::string InstNS = Target.inst_begin()->second.Namespace;
|
// 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;
|
||||||
|
}
|
||||||
|
|
||||||
if (!InstNS.empty()) InstNS += "::";
|
if (!InstNS.empty()) InstNS += "::";
|
||||||
|
|
||||||
// Group the patterns by their top-level opcodes.
|
// Group the patterns by their top-level opcodes.
|
||||||
|
Reference in New Issue
Block a user