summaryrefslogtreecommitdiff
path: root/lib/Analysis/DebugInfo.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-12-28 20:45:51 +0000
committerChris Lattner <sabre@nondot.org>2009-12-28 20:45:51 +0000
commit0eb419800ae51d6e0e00a656ede0627483755361 (patch)
tree11dc009d755eda2b02147fc4be338d0912bce39c /lib/Analysis/DebugInfo.cpp
parent7d05c46d601cbb52be605019548c34286c02e3a3 (diff)
downloadllvm-0eb419800ae51d6e0e00a656ede0627483755361.tar.gz
llvm-0eb419800ae51d6e0e00a656ede0627483755361.tar.bz2
llvm-0eb419800ae51d6e0e00a656ede0627483755361.tar.xz
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
Diffstat (limited to 'lib/Analysis/DebugInfo.cpp')
-rw-r--r--lib/Analysis/DebugInfo.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/Analysis/DebugInfo.cpp b/lib/Analysis/DebugInfo.cpp
index c8cb60f0c1..3732818de3 100644
--- a/lib/Analysis/DebugInfo.cpp
+++ b/lib/Analysis/DebugInfo.cpp
@@ -1119,7 +1119,7 @@ Instruction *DIFactory::InsertDbgValueIntrinsic(Value *V, Value *Offset,
void DebugInfoFinder::processModule(Module &M) {
MetadataContext &TheMetadata = M.getContext().getMetadata();
- unsigned MDDbgKind = TheMetadata.getMDKind("dbg");
+ unsigned MDDbgKind = TheMetadata.getMDKindID("dbg");
for (Module::iterator I = M.begin(), E = M.end(); I != E; ++I)
for (Function::iterator FI = (*I).begin(), FE = (*I).end(); FI != FE; ++FI)
@@ -1127,9 +1127,8 @@ void DebugInfoFinder::processModule(Module &M) {
++BI) {
if (DbgDeclareInst *DDI = dyn_cast<DbgDeclareInst>(BI))
processDeclare(DDI);
- else if (MDDbgKind)
- if (MDNode *L = TheMetadata.getMD(MDDbgKind, BI))
- processLocation(DILocation(L));
+ else if (MDNode *L = TheMetadata.getMD(MDDbgKind, BI))
+ processLocation(DILocation(L));
}
NamedMDNode *NMD = M.getNamedMetadata("llvm.dbg.gv");