]> granicus.if.org Git - clang/commitdiff
strength reduce this call away.
authorChris Lattner <sabre@nondot.org>
Tue, 29 Dec 2009 07:49:13 +0000 (07:49 +0000)
committerChris Lattner <sabre@nondot.org>
Tue, 29 Dec 2009 07:49:13 +0000 (07:49 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92253 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CodeGenModule.cpp

index abb78f0dcfa517d23e3de373d2b6823c5df2218c..d497471e4597bfcdf4204085e70436054c09c5f8 100644 (file)
@@ -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();
   }
 }