summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Instrumentation
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2011-08-16 04:52:55 +0000
committerBill Wendling <isanbard@gmail.com>2011-08-16 04:52:55 +0000
commitbe33e8d58dc3689224312d48ebcc152dd9fe7df1 (patch)
tree2255563feecd7f3a8b2839dd2125e23f8b851e2d /llvm/lib/Transforms/Instrumentation
parent2263c109461aa5ba60e35257535e8abe3c3bd32a (diff)
downloadbcm5719-llvm-be33e8d58dc3689224312d48ebcc152dd9fe7df1.tar.gz
bcm5719-llvm-be33e8d58dc3689224312d48ebcc152dd9fe7df1.zip
A few places where we want to skip the landingpad instruction for insertion.
llvm-svn: 137712
Diffstat (limited to 'llvm/lib/Transforms/Instrumentation')
-rw-r--r--llvm/lib/Transforms/Instrumentation/GCOVProfiling.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Instrumentation/GCOVProfiling.cpp b/llvm/lib/Transforms/Instrumentation/GCOVProfiling.cpp
index 3a7f21c4ce4..4f22bbc9c7f 100644
--- a/llvm/lib/Transforms/Instrumentation/GCOVProfiling.cpp
+++ b/llvm/lib/Transforms/Instrumentation/GCOVProfiling.cpp
@@ -505,7 +505,9 @@ bool GCOVProfiler::emitProfileArcs(DebugInfoFinder &DIF) {
}
for (int i = 0, e = ComplexEdgeSuccs.size(); i != e; ++i) {
// call runtime to perform increment
- IRBuilder<> Builder(ComplexEdgeSuccs[i+1]->getFirstNonPHI());
+ BasicBlock::iterator InsertPt = ComplexEdgeSuccs[i+1]->getFirstNonPHI();
+ if (isa<LandingPadInst>(InsertPt)) ++InsertPt;
+ IRBuilder<> Builder(InsertPt);
Value *CounterPtrArray =
Builder.CreateConstInBoundsGEP2_64(EdgeTable, 0,
i * ComplexEdgePreds.size());
OpenPOWER on IntegriCloud