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.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99983 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/CGDebugInfo.cpp b/lib/CodeGen/CGDebugInfo.cpp
index 426f155..fc7c0c5 100644
--- a/lib/CodeGen/CGDebugInfo.cpp
+++ b/lib/CodeGen/CGDebugInfo.cpp
@@ -1602,7 +1602,7 @@
   llvm::DILocation DO(NULL);
   llvm::DILocation DL = DebugFactory.CreateLocation(Line, Column, DS, DO);
   
-  Call->setMetadata("dbg", DL.getNode());
+  Call->setDbgMetadata(DL.getNode());
 }
 
 /// EmitDeclare - Emit local variable declaration debug info.
@@ -1670,7 +1670,7 @@
   llvm::DILocation DL = 
     DebugFactory.CreateLocation(Line, PLoc.getColumn(), DS, DO);
   
-  Call->setMetadata("dbg", DL.getNode());
+  Call->setDbgMetadata(DL.getNode());
 }
 
 void CGDebugInfo::EmitDeclareOfAutoVariable(const VarDecl *VD,
diff --git a/lib/CodeGen/CodeGenModule.cpp b/lib/CodeGen/CodeGenModule.cpp
index c44b311..65aceb7 100644
--- a/lib/CodeGen/CodeGenModule.cpp
+++ b/lib/CodeGen/CodeGenModule.cpp
@@ -1246,8 +1246,8 @@
       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();
   }
 }