If a named mdnode is removed then mark module as changed.

llvm-svn: 107412
This commit is contained in:
Devang Patel 2010-07-01 18:27:46 +00:00
parent 511e5f47de
commit fa499484c0

View File

@ -227,8 +227,10 @@ static bool StripDebugInfo(Module &M) {
NME = M.named_metadata_end(); NMI != NME;) {
NamedMDNode *NMD = NMI;
++NMI;
if (NMD->getName().startswith("llvm.dbg."))
if (NMD->getName().startswith("llvm.dbg.")) {
NMD->eraseFromParent();
Changed = true;
}
}
unsigned MDDbgKind = M.getMDKindID("dbg");