[PATCH] Infrastructure changes to support DW_OP_piece in LLVM IR.
Eric Christopher
echristo at gmail.com
Thu Jul 31 16:42:59 PDT 2014
One comment and then nothing but nits in the inline stuff. It looks very good in general, however, tests? :)
I assume they were dropped somewhere so go ahead and add them and LGTM.
Thanks for all of your hard work here!
-eric
================
Comment at: lib/CodeGen/AsmPrinter/DwarfDebug.cpp:1240
@@ +1239,3 @@
+ assert(Begin->isDebugValue() && "Invalid History entry");
+
+
----------------
Extra white space.
================
Comment at: lib/CodeGen/AsmPrinter/DwarfDebug.cpp:1242
@@ +1241,3 @@
+
+ // Check if a variable is unaccessible in this range.
+ if (!Begin->isDebugValue() ||
----------------
"inaccessible"
================
Comment at: lib/CodeGen/AsmPrinter/DwarfDebug.cpp:1256
@@ +1255,3 @@
+ OpenRanges.erase(Last, OpenRanges.end());
+
+
----------------
Extra whitespace.
================
Comment at: lib/CodeGen/AsmPrinter/DwarfDebug.cpp:2086
@@ +2085,3 @@
+ unsigned VarSize = Var.getSizeInBits(Map);
+ assert(PieceSize+PieceOffset <= VarSize/8
+ && "piece is larger than or outside of variable");
----------------
Weird formatting?
================
Comment at: lib/CodeGen/AsmPrinter/DwarfDebug.cpp:2092
@@ +2091,3 @@
+ if (Piece.isLocation() && Piece.getLoc().isReg())
+ Asm->EmitDwarfRegOpPiece(Streamer,
+ Piece.getLoc(),
----------------
Weird formatting?
================
Comment at: lib/CodeGen/AsmPrinter/DwarfUnit.cpp:605
@@ -604,1 +604,3 @@
addUInt(*Loc, dwarf::DW_FORM_data1, dwarf::DW_OP_deref);
+ } else if (Element == DIBuilder::OpPiece) {
+ unsigned SizeOfByte = 8;
----------------
Comment with the format here that you're adding? Also probably const for the SizeOfByte.
http://reviews.llvm.org/D3373
More information about the llvm-commits
mailing list