From 915c656a745ea9a580ebb6a23cfe404d27e08d32 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Thu, 13 Dec 2007 00:04:46 +0000 Subject: [PATCH] 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 --- lib/Transforms/Instrumentation/EdgeProfiling.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Transforms/Instrumentation/EdgeProfiling.cpp b/lib/Transforms/Instrumentation/EdgeProfiling.cpp index 360d2b7db71..ca81176d329 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 { -- 2.34.1