summaryrefslogtreecommitdiff
path: root/lib/Transforms
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2003-10-15 16:42:21 +0000
committerChris Lattner <sabre@nondot.org>2003-10-15 16:42:21 +0000
commitfb42dd83f81541864f3950a3b99e732ca372e19b (patch)
treed0a363008bd2106eb410d81a83f2bd306c127153 /lib/Transforms
parent14d9ce7892c7c0008c7cc38894ee3f71e4104d94 (diff)
downloadllvm-fb42dd83f81541864f3950a3b99e732ca372e19b.tar.gz
llvm-fb42dd83f81541864f3950a3b99e732ca372e19b.tar.bz2
llvm-fb42dd83f81541864f3950a3b99e732ca372e19b.tar.xz
Cleanup
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9133 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms')
-rw-r--r--lib/Transforms/Utils/DemoteRegToStack.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/lib/Transforms/Utils/DemoteRegToStack.cpp b/lib/Transforms/Utils/DemoteRegToStack.cpp
index 044cd1610a..18266fb4ce 100644
--- a/lib/Transforms/Utils/DemoteRegToStack.cpp
+++ b/lib/Transforms/Utils/DemoteRegToStack.cpp
@@ -122,11 +122,8 @@ static void AddLoadsAndStores(AllocaInst* XSlot, Instruction& X,
}
static void DeletePhis(PhiSet& phisToGo) {
- for (PhiSetIterator PI=phisToGo.begin(), PE=phisToGo.end(); PI != PE; ++PI) {
- assert((*PI)->use_size() == 0 && "This PHI should be DEAD!");
- (*PI)->getParent()->getInstList().remove(*PI);
- delete *PI;
- }
+ for (PhiSetIterator PI = phisToGo.begin(), PE =phisToGo.end(); PI != PE; ++PI)
+ (*PI)->getParent()->getInstList().erase(*PI);
phisToGo.clear();
}