summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorEkaterina Romanova <katya_romanova@playstation.sony.com>2014-12-10 23:19:56 +0000
committerEkaterina Romanova <katya_romanova@playstation.sony.com>2014-12-10 23:19:56 +0000
commitceeaba79321e83a7b0fbd0ea364cbd8c06127a6c (patch)
treec04c2ea8d6ef5944dc6e8bf3e75d6e3d4f38c042 /llvm/lib
parent2936851426df094bf1e42091d9390df8cbbef7ef (diff)
downloadbcm5719-llvm-ceeaba79321e83a7b0fbd0ea364cbd8c06127a6c.tar.gz
bcm5719-llvm-ceeaba79321e83a7b0fbd0ea364cbd8c06127a6c.zip
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 llvm-svn: 223981
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
index 230ea465182..8897ad0ae6c 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
@@ -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();
OpenPOWER on IntegriCloud