X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;ds=sidebyside;f=lib%2FTransforms%2FInstrumentation%2FAddressSanitizer.cpp;h=d99bb87fd4c7800749915749334713392cfef1ab;hb=bd0052a0f26f04b8fcf59e8f645e5e33751e1f6e;hp=75f42f30fab1036bf7f6232859e506f1c7f6bc75;hpb=324d96b9e265b0fd8bf63a28340910def64e2164;p=oota-llvm.git diff --git a/lib/Transforms/Instrumentation/AddressSanitizer.cpp b/lib/Transforms/Instrumentation/AddressSanitizer.cpp index 75f42f30fab..d99bb87fd4c 100644 --- a/lib/Transforms/Instrumentation/AddressSanitizer.cpp +++ b/lib/Transforms/Instrumentation/AddressSanitizer.cpp @@ -1148,6 +1148,10 @@ bool AddressSanitizer::poisonStackInFunction(Function &F) { } } + // We are done. Remove the old unused alloca instructions. + for (size_t i = 0, n = AllocaVec.size(); i < n; i++) + AllocaVec[i]->eraseFromParent(); + if (ClDebugStack) { DEBUG(dbgs() << F); }