aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/SelectionDAG/FastISel.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/CodeGen/SelectionDAG/FastISel.cpp
parent7d05c46d601cbb52be605019548c34286c02e3a3 (diff)
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/CodeGen/SelectionDAG/FastISel.cpp')
-rw-r--r--lib/CodeGen/SelectionDAG/FastISel.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/CodeGen/SelectionDAG/FastISel.cpp b/lib/CodeGen/SelectionDAG/FastISel.cpp
index 9e182efbbb..24a5b0d648 100644
--- a/lib/CodeGen/SelectionDAG/FastISel.cpp
+++ b/lib/CodeGen/SelectionDAG/FastISel.cpp
@@ -351,9 +351,9 @@ bool FastISel::SelectCall(User *I) {
if (MMI) {
MetadataContext &TheMetadata =
DI->getParent()->getContext().getMetadata();
- unsigned MDDbgKind = TheMetadata.getMDKind("dbg");
- MDNode *Dbg = TheMetadata.getMD(MDDbgKind, DI);
- MMI->setVariableDbgInfo(DI->getVariable(), FI, Dbg);
+ unsigned MDDbgKind = TheMetadata.getMDKindID("dbg");
+ if (MDNode *Dbg = TheMetadata.getMD(MDDbgKind, DI))
+ MMI->setVariableDbgInfo(DI->getVariable(), FI, Dbg);
}
return true;
}