Strip new llvm.dbg.value intrinsic.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95807 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Devang Patel 2010-02-10 21:19:56 +00:00
parent 1b6c060591
commit df9292cbdd

View File

@ -214,6 +214,15 @@ static bool StripDebugInfo(Module &M) {
Changed = true;
}
if (Function *DbgVal = M.getFunction("llvm.dbg.value")) {
while (!DbgVal->use_empty()) {
CallInst *CI = cast<CallInst>(DbgVal->use_back());
CI->eraseFromParent();
}
DbgVal->eraseFromParent();
Changed = true;
}
NamedMDNode *NMD = M.getNamedMetadata("llvm.dbg.gv");
if (NMD) {
Changed = true;