aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Transforms/Instrumentation
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2007-12-13 00:04:46 +0000
committerChris Lattner <sabre@nondot.org>2007-12-13 00:04:46 +0000
commita0b4c94f7fed612873cc59864b0bd152c5f9f509 (patch)
tree674e41fbe9af0318df1a43fbae05ea3eb37373d2 /lib/Transforms/Instrumentation
parent16159f4b1783ecb8c0eff8db63da64158a852f17 (diff)
downloadexternal_llvm-a0b4c94f7fed612873cc59864b0bd152c5f9f509.zip
external_llvm-a0b4c94f7fed612873cc59864b0bd152c5f9f509.tar.gz
external_llvm-a0b4c94f7fed612873cc59864b0bd152c5f9f509.tar.bz2
Fix for edge profiling, patch by 'Marc' for PR1857
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44965 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Instrumentation')
-rw-r--r--lib/Transforms/Instrumentation/EdgeProfiling.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Transforms/Instrumentation/EdgeProfiling.cpp b/lib/Transforms/Instrumentation/EdgeProfiling.cpp
index 360d2b7..ca81176 100644
--- a/lib/Transforms/Instrumentation/EdgeProfiling.cpp
+++ b/lib/Transforms/Instrumentation/EdgeProfiling.cpp
@@ -84,7 +84,7 @@ bool EdgeProfiler::runOnModule(Module &M) {
// Okay, we are guaranteed that the edge is no longer critical. If we
// only have a single successor, insert the counter in this block,
// otherwise insert it in the successor block.
- if (TI->getNumSuccessors() == 0) {
+ if (TI->getNumSuccessors() == 1) {
// Insert counter at the start of the block
IncrementCounterInBlock(BB, i++, Counters);
} else {