[PATCH] D38223: Make sure the basic block has an insertion point before dereferencing it

Reid Kleckner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 25 09:55:49 PDT 2017


rnk added a comment.

I think any `invoke` or `cleanupret` that unwinds to a catchswitch needs to look through the successors of the catchswitch. The unwind edge may be another catchswitch, which we must also look through. We should add all the non-catchswitch successors to ComplexEdgeSuccs.



================
Comment at: lib/Transforms/Instrumentation/GCOVProfiling.cpp:642
+            if (insertPtr == BB.end()) {
+              continue;
+            }
----------------
I think `continue` is problematic because it fails to update `Edge`.


Repository:
  rL LLVM

https://reviews.llvm.org/D38223





More information about the llvm-commits mailing list