[PATCH] Emit DWARF3 call frame information when DWARF3+ debug info is requested
Eric Christopher
echristo at gmail.com
Mon Jun 16 11:26:48 PDT 2014
Not to hijack Dave's review, but looks good to me in general.
-eric
================
Comment at: lib/MC/MCDwarf.cpp:1273
@@ -1272,2 +1272,3 @@
if (verboseAsm) streamer.AddComment("DW_CIE_VERSION");
- streamer.EmitIntValue(dwarf::DW_CIE_VERSION, 1);
+ uint8_t CIEVersion = context.getDwarfVersion() <= 2 ? 1 : 3;
+ streamer.EmitIntValue(CIEVersion, 1);
----------------
Comment on the version that we're adding as 1 for < 3, and 3 for >= 3 would be nice.
================
Comment at: lib/MC/MCDwarf.cpp:1306
@@ +1305,3 @@
+ streamer.EmitIntValue(MRI->getDwarfRegNum(MRI->getRARegister(), true), 1);
+ } else
+ streamer.EmitULEB128IntValue(
----------------
I think the general style is "if one half has braces they both do" but I'm not wedded to it.
http://reviews.llvm.org/D4027
More information about the llvm-commits
mailing list