rename getMDKind -> getMDKindID, make it autoinsert if an MD Kind

doesn't exist already, eliminate registerMDKind.  Tidy up a bunch
of random stuff.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92225 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner
2009-12-28 20:45:51 +00:00
parent 7d05c46d60
commit 0eb419800a
11 changed files with 59 additions and 108 deletions
+1 -3
View File
@@ -221,9 +221,7 @@ static bool StripDebugInfo(Module &M) {
NMD->eraseFromParent();
}
MetadataContext &TheMetadata = M.getContext().getMetadata();
unsigned MDDbgKind = TheMetadata.getMDKind("dbg");
if (!MDDbgKind)
return Changed;
unsigned MDDbgKind = TheMetadata.getMDKindID("dbg");
for (Module::iterator MI = M.begin(), ME = M.end(); MI != ME; ++MI)
for (Function::iterator FI = MI->begin(), FE = MI->end(); FI != FE;