From 898923c1db57b1cb3947c0553e59c1bd7c9ac59a Mon Sep 17 00:00:00 2001 From: Guo Yejun Date: Fri, 25 Jul 2014 06:00:27 +0800 Subject: delete GEPInst when it is no longer used Signed-off-by: Guo Yejun Reviewed-by: Zhigang Gong --- backend/src/llvm/llvm_passes.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/src/llvm/llvm_passes.cpp b/backend/src/llvm/llvm_passes.cpp index 30784704..b8ab844c 100644 --- a/backend/src/llvm/llvm_passes.cpp +++ b/backend/src/llvm/llvm_passes.cpp @@ -378,7 +378,7 @@ namespace gbe //replace uses of the GEP instruction with the newly calculated pointer GEPInst->replaceAllUsesWith(intToPtrInst); GEPInst->dropAllReferences(); - GEPInst->removeFromParent(); + GEPInst->eraseFromParent(); #if FORMER_VERSION //insert new pointer into parent list -- cgit v1.2.3