summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CodeGenModule.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
-rw-r--r--clang/lib/CodeGen/CodeGenModule.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp
index abb78f0dcfa..d497471e459 100644
--- a/clang/lib/CodeGen/CodeGenModule.cpp
+++ b/clang/lib/CodeGen/CodeGenModule.cpp
@@ -1090,7 +1090,8 @@ static void ReplaceUsesOfNonProtoTypeWithRealFunction(llvm::GlobalValue *Old,
CI->replaceAllUsesWith(NewCall);
// Copy any custom metadata attached with CI.
- CI->getContext().getMetadata().copyMD(CI, NewCall);
+ if (llvm::MDNode *DbgNode = CI->getMetadata("dbg"))
+ NewCall->setMetadata("dbg", DbgNode);
CI->eraseFromParent();
}
}
OpenPOWER on IntegriCloud