From: Chris Lattner Date: Tue, 29 Dec 2009 07:49:13 +0000 (+0000) Subject: strength reduce this call away. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1280708c17d373762ea4110b4f989d6c7239f6fb;p=clang strength reduce this call away. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92253 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/CodeGenModule.cpp b/lib/CodeGen/CodeGenModule.cpp index abb78f0dcf..d497471e45 100644 --- a/lib/CodeGen/CodeGenModule.cpp +++ b/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(); } }