[PATCH] D27980: stripDebugInfo() should remove DILocation's found in !llvm.loop metadata

Daniel Sanders via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 21 01:10:09 PST 2016


dsanders added a subscriber: bogner.
dsanders added inline comments.


================
Comment at: lib/IR/DebugInfo.cpp:244
+  auto DebugLocOp =
+      std::find_if(N->op_begin() + 1, N->op_end(), [](const MDOperand &Op) {
+        return isa<DILocation>(Op.get());
----------------
> Can N->op_begin() == N->op_end() ever? If so, I think this is incorrect.
> If not, maybe we should assert it?

I believe the first operand is always a self-reference (e.g. !13 in the test). I'll add an assert


https://reviews.llvm.org/D27980





More information about the llvm-commits mailing list