aboutsummaryrefslogtreecommitdiff
path: root/lib/Target/CppBackend
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Target/CppBackend')
-rw-r--r--lib/Target/CppBackend/SimplifyAllocas.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/lib/Target/CppBackend/SimplifyAllocas.cpp b/lib/Target/CppBackend/SimplifyAllocas.cpp
index 8fbda0b97c..f135122dd5 100644
--- a/lib/Target/CppBackend/SimplifyAllocas.cpp
+++ b/lib/Target/CppBackend/SimplifyAllocas.cpp
@@ -102,9 +102,6 @@ bool SimplifyAllocas::runOnFunction(Function &Func) {
}
}
if (!Fail && Aliases.size() > 0) {
-dump("win!");
-dumpv("%s", Func.getName().str().c_str());
-dumpIR(AI);
// success, replace the alloca and the bitcast aliases with a single simple alloca
AllocaInst *NA = new AllocaInst(ActualType, ConstantInt::get(i32, 1), "", I);
NA->takeName(AI);
@@ -121,7 +118,7 @@ dumpIR(AI);
}
}
for (unsigned i = 0; i < ToRemove.size(); i++) {
- ToRemove[i]->removeFromParent();
+ ToRemove[i]->eraseFromParent();
}
return Changed;
}