mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-21 23:17:16 +00:00
A fix for PR21176.
DW_OP_const <const> doesn't describe a constant value, but a value at a constant address. The proper way to describe a constant value is DW_OP_constu <const>, DW_OP_stack_value. Added DW_OP_stack_value to the stack. -This line, and those below, will be ignored-- M lib/CodeGen/AsmPrinter/DwarfDebug.cpp A test/DebugInfo/incorrect-variable-debugloc1.ll git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223981 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -1722,6 +1722,8 @@ void DwarfDebug::emitDebugLocValue(ByteStreamer &Streamer,
|
||||
Streamer.EmitInt8(dwarf::DW_OP_constu, "DW_OP_constu");
|
||||
Streamer.EmitULEB128(Value.getInt());
|
||||
}
|
||||
if (getDwarfVersion() >= 4)
|
||||
Streamer.EmitInt8(dwarf::DW_OP_stack_value, "DW_OP_stack_value");
|
||||
} else if (Value.isLocation()) {
|
||||
MachineLocation Loc = Value.getLoc();
|
||||
DIExpression Expr = Value.getExpression();
|
||||
|
||||
Reference in New Issue
Block a user