From c60346388d60b1756f3675dabb60dc58da0728ec Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Thu, 1 Apr 2010 06:31:43 +0000 Subject: adjust to IRBuilder change and use faster DebugLoc apis. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100093 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/CodeGenModule.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/CodeGen/CodeGenModule.cpp') diff --git a/lib/CodeGen/CodeGenModule.cpp b/lib/CodeGen/CodeGenModule.cpp index 65aceb741a..3c872c8560 100644 --- a/lib/CodeGen/CodeGenModule.cpp +++ b/lib/CodeGen/CodeGenModule.cpp @@ -1245,9 +1245,9 @@ static void ReplaceUsesOfNonProtoTypeWithRealFunction(llvm::GlobalValue *Old, if (!CI->use_empty()) CI->replaceAllUsesWith(NewCall); - // Copy any custom metadata attached with CI. - if (llvm::MDNode *DbgNode = CI->getDbgMetadata()) - NewCall->setDbgMetadata(DbgNode); + // Copy debug location attached to CI. + if (!CI->getDebugLoc().isUnknown()) + NewCall->setDebugLoc(CI->getDebugLoc()); CI->eraseFromParent(); } } -- cgit v1.2.3-70-g09d2