mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +00:00
CodeGen: Fix MachineInstr::print() for DBG_VALUE
Grab the `MDLocalVariable` from the second-to-last argument; the last argument is an `MDExpression`, and mixing them up will crash. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234019 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -1711,9 +1711,9 @@ void MachineInstr::print(raw_ostream &OS, bool SkipOpers) const {
|
||||
}
|
||||
|
||||
// Print debug location information.
|
||||
if (isDebugValue() && getOperand(e - 1).isMetadata()) {
|
||||
if (isDebugValue() && getOperand(e - 2).isMetadata()) {
|
||||
if (!HaveSemi) OS << ";";
|
||||
DIVariable DV(getOperand(e - 1).getMetadata());
|
||||
DIVariable DV(getOperand(e - 2).getMetadata());
|
||||
OS << " line no:" << DV.getLineNumber();
|
||||
if (auto *InlinedAt = DV.getInlinedAt()) {
|
||||
DebugLoc InlinedAtDL(InlinedAt);
|
||||
|
Reference in New Issue
Block a user