aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/SelectionDAG/FastISel.cpp
diff options
context:
space:
mode:
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;
}