mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-09 11:25:55 +00:00
tidy up
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100700 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -466,7 +466,7 @@ static bool EmitDebugValueComment(const MachineInstr *MI, AsmPrinter &AP) {
|
|||||||
OS << '\t' << AP.MAI->getCommentString() << "DEBUG_VALUE: ";
|
OS << '\t' << AP.MAI->getCommentString() << "DEBUG_VALUE: ";
|
||||||
|
|
||||||
// cast away const; DIetc do not take const operands for some reason.
|
// cast away const; DIetc do not take const operands for some reason.
|
||||||
DIVariable V((MDNode*)(MI->getOperand(2).getMetadata()));
|
DIVariable V(const_cast<MDNode*>(MI->getOperand(2).getMetadata()));
|
||||||
OS << V.getName() << " <- ";
|
OS << V.getName() << " <- ";
|
||||||
|
|
||||||
// Register or immediate value. Register 0 means undef.
|
// Register or immediate value. Register 0 means undef.
|
||||||
@@ -486,7 +486,8 @@ static bool EmitDebugValueComment(const MachineInstr *MI, AsmPrinter &AP) {
|
|||||||
}
|
}
|
||||||
} else if (MI->getOperand(0).isImm()) {
|
} else if (MI->getOperand(0).isImm()) {
|
||||||
OS << MI->getOperand(0).getImm();
|
OS << MI->getOperand(0).getImm();
|
||||||
} else if (MI->getOperand(0).isReg()) {
|
} else {
|
||||||
|
assert(MI->getOperand(0).isReg() && "Unknown operand type");
|
||||||
if (MI->getOperand(0).getReg() == 0) {
|
if (MI->getOperand(0).getReg() == 0) {
|
||||||
// Suppress offset, it is not meaningful here.
|
// Suppress offset, it is not meaningful here.
|
||||||
OS << "undef";
|
OS << "undef";
|
||||||
@@ -495,9 +496,8 @@ static bool EmitDebugValueComment(const MachineInstr *MI, AsmPrinter &AP) {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
OS << AP.TM.getRegisterInfo()->getName(MI->getOperand(0).getReg());
|
OS << AP.TM.getRegisterInfo()->getName(MI->getOperand(0).getReg());
|
||||||
} else
|
}
|
||||||
llvm_unreachable("Unknown operand type");
|
|
||||||
|
|
||||||
OS << '+' << MI->getOperand(1).getImm();
|
OS << '+' << MI->getOperand(1).getImm();
|
||||||
// NOTE: Want this comment at start of line, don't emit with AddComment.
|
// NOTE: Want this comment at start of line, don't emit with AddComment.
|
||||||
AP.OutStreamer.EmitRawText(OS.str());
|
AP.OutStreamer.EmitRawText(OS.str());
|
||||||
|
Reference in New Issue
Block a user