From be49c03ff49d31c5039e2ee5e0e8fe71ab8cc455 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Wed, 31 Mar 2010 03:36:01 +0000 Subject: use the new optimized debug info metadata accessors. In addition to the inherent win, this eliminates the pointless cost of going through the name -> mdkind stringmap that we were paying. llvm-svn: 99983 --- clang/lib/CodeGen/CodeGenModule.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'clang/lib/CodeGen/CodeGenModule.cpp') diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp index c44b311..65aceb7 100644 --- a/clang/lib/CodeGen/CodeGenModule.cpp +++ b/clang/lib/CodeGen/CodeGenModule.cpp @@ -1246,8 +1246,8 @@ static void ReplaceUsesOfNonProtoTypeWithRealFunction(llvm::GlobalValue *Old, CI->replaceAllUsesWith(NewCall); // Copy any custom metadata attached with CI. - if (llvm::MDNode *DbgNode = CI->getMetadata("dbg")) - NewCall->setMetadata("dbg", DbgNode); + if (llvm::MDNode *DbgNode = CI->getDbgMetadata()) + NewCall->setDbgMetadata(DbgNode); CI->eraseFromParent(); } } -- cgit v1.1