[PATCH] D16742: [DWARFDebug] Fix another case of overlapping ranges

Adrian Prantl via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 3 09:00:49 PST 2016


aprantl accepted this revision.
aprantl added a comment.
This revision is now accepted and ready to land.

Thanks! Minor comments inline.


================
Comment at: lib/CodeGen/AsmPrinter/DwarfDebug.cpp:836
@@ +835,3 @@
+        int res =
+            pieceCmp(cast_or_null<DIExpression>(Values[i].Expression),
+                     cast_or_null<DIExpression>(Next.Values[j].Expression));
----------------
pieceCmp will crash if passed a nullpointer so we might as well use a regular cast here.

================
Comment at: lib/CodeGen/AsmPrinter/DwarfDebug.cpp:841
@@ +840,3 @@
+        else if (res == -1)
+          break;
+      }
----------------
Can you add comments to the conditions that explain the conditions we're testing for here?
if (res == -1) break; needs some detective work to decode :-)


Repository:
  rL LLVM

http://reviews.llvm.org/D16742





More information about the llvm-commits mailing list