aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2013-12-22 12:03:24 -0800
committerAlon Zakai <alonzakai@gmail.com>2013-12-22 12:03:24 -0800
commit9496e82d190a7ff02acbbbe11e7b8ffe8aae5c45 (patch)
treec27cac45644deef5d1e10cef0c16673eaa1f4673
parentd85db2a0f3478a29b75c52f7f1812bc4da7fe767 (diff)
fix simplify allocas
-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;
}