aboutsummaryrefslogtreecommitdiffstats
path: root/lib/VMCore/IRBuilder.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/VMCore/IRBuilder.cpp')
-rw-r--r--lib/VMCore/IRBuilder.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/VMCore/IRBuilder.cpp b/lib/VMCore/IRBuilder.cpp
index 0b4a10925a..4c0299c6fc 100644
--- a/lib/VMCore/IRBuilder.cpp
+++ b/lib/VMCore/IRBuilder.cpp
@@ -43,7 +43,7 @@ void IRBuilderBase::SetCurrentDebugLocation(MDNode *L) {
void IRBuilderBase::SetInstDebugLocation(Instruction *I) const {
if (CurDbgLocation)
- Context.getMetadata().addMD(DbgMDKind, CurDbgLocation, I);
+ I->setMetadata(DbgMDKind, CurDbgLocation);
}
const Type *IRBuilderBase::getCurrentFunctionReturnType() const {