From 051a950000e21935165db56695e35bade668193b Mon Sep 17 00:00:00 2001 From: Gabor Greif Date: Sun, 6 Apr 2008 20:25:17 +0000 Subject: API changes for class Use size reduction, wave 1. Specifically, introduction of XXX::Create methods for Users that have a potentially variable number of Uses. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49277 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Transforms/Scalar/ADCE.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/Transforms/Scalar/ADCE.cpp') diff --git a/lib/Transforms/Scalar/ADCE.cpp b/lib/Transforms/Scalar/ADCE.cpp index ed9d9309d0..d909d0227c 100644 --- a/lib/Transforms/Scalar/ADCE.cpp +++ b/lib/Transforms/Scalar/ADCE.cpp @@ -163,7 +163,7 @@ bool ADCE::deleteDeadInstructionsInLiveBlock(BasicBlock *BB) { /// successors it goes to. This eliminate a use of the condition as well. /// TerminatorInst *ADCE::convertToUnconditionalBranch(TerminatorInst *TI) { - BranchInst *NB = new BranchInst(TI->getSuccessor(0), TI); + BranchInst *NB = BranchInst::Create(TI->getSuccessor(0), TI); BasicBlock *BB = TI->getParent(); // Remove entries from PHI nodes to avoid confusing ourself later... @@ -325,8 +325,8 @@ bool ADCE::doADCE() { // node as a special case. // if (!AliveBlocks.count(&Func->front())) { - BasicBlock *NewEntry = new BasicBlock(); - new BranchInst(&Func->front(), NewEntry); + BasicBlock *NewEntry = BasicBlock::Create(); + BranchInst::Create(&Func->front(), NewEntry); Func->getBasicBlockList().push_front(NewEntry); AliveBlocks.insert(NewEntry); // This block is always alive! LiveSet.insert(NewEntry->getTerminator()); // The branch is live -- cgit v1.2.3