[PATCH] D13178: Fix SafeStack debug locations

Alexey Samsonov via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 30 10:35:37 PDT 2015


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

LGTM


================
Comment at: include/llvm/Transforms/Utils/Local.h:276
@@ +275,3 @@
+/// a new value. If Deref is true, an additional DW_OP_deref is prepended to the
+/// expression. If Offset is non-zero, a constant displacement is added to the
+/// expression (after the optional Deref). Offset can be negative.
----------------
samsonov wrote:
> Please elaborate what's actually going on - whether you rewrite expr to be (*orig + offset), or *(orig + offset) - it's not entirely clear from comment
Please disregard this, I probably misread the new comment.

================
Comment at: lib/IR/DebugInfoMetadata.cpp:519
@@ -517,2 +518,3 @@
       return I->get() + I->getSize() == E->get();
     case dwarf::DW_OP_plus:
+    case dwarf::DW_OP_minus:
----------------
samsonov wrote:
> This looks weird to me: why don't we use std::advance(I, I->getSize()) instead?
That's fine: expr_op iterator will handle this.


Repository:
  rL LLVM

http://reviews.llvm.org/D13178





More information about the llvm-commits mailing list