[PATCH] DW_OP_const* is invalid as a location

David Blaikie dblaikie at gmail.com
Mon Dec 8 11:59:06 PST 2014


================
Comment at: lib/CodeGen/AsmPrinter/DwarfDebug.cpp:1721
@@ -1720,2 +1720,3 @@
       Streamer.EmitSLEB128(Value.getInt());
+      Streamer.EmitInt8(dwarf::DW_OP_stack_value, "DW_OP_stack_value");
     } else {
----------------
Should this just go outside the if/else, so it's written once rather than twice?

================
Comment at: lib/CodeGen/AsmPrinter/DwarfDebug.cpp:1721
@@ -1720,2 +1720,3 @@
       Streamer.EmitSLEB128(Value.getInt());
+      Streamer.EmitInt8(dwarf::DW_OP_stack_value, "DW_OP_stack_value");
     } else {
----------------
dblaikie wrote:
> Should this just go outside the if/else, so it's written once rather than twice?
Do we need to conditionalize this based on whether we're emitting DWARF >= 4? And just leave it the old/broken way in DWARF < 4 for old consumers to keep guessing the way they have before (like LLDB)?

================
Comment at: test/DebugInfo/incorrect-variable-debugloc1.ll:14
@@ +13,3 @@
+; 
+; int main()
+; {
----------------
Can this example be simplified further? (do we need the loop, etc?)

http://reviews.llvm.org/D6568






More information about the llvm-commits mailing list