aboutsummaryrefslogtreecommitdiff
path: root/lib/Transforms/Instrumentation/ProfilePaths/CombineBranch.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Transforms/Instrumentation/ProfilePaths/CombineBranch.cpp')
-rw-r--r--lib/Transforms/Instrumentation/ProfilePaths/CombineBranch.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/Transforms/Instrumentation/ProfilePaths/CombineBranch.cpp b/lib/Transforms/Instrumentation/ProfilePaths/CombineBranch.cpp
index 04207820a5..b178b5dedf 100644
--- a/lib/Transforms/Instrumentation/ProfilePaths/CombineBranch.cpp
+++ b/lib/Transforms/Instrumentation/ProfilePaths/CombineBranch.cpp
@@ -122,9 +122,7 @@ void CombineBranches::removeRedundant(std::map<BasicBlock *, BasicBlock *> &be){
sameTarget.push_back(MI->first);
BasicBlock *newBB = new BasicBlock("newCommon", MI->first->getParent());
- BranchInst *newBranch = new BranchInst(MI->second);
-
- newBB->getInstList().push_back(newBranch);
+ BranchInst *newBranch = new BranchInst(MI->second, 0, 0, newBB);
std::map<PHINode *, std::vector<unsigned int> > phiMap;