[cfe-commits] r99983 - in /cfe/trunk/lib/CodeGen: CGDebugInfo.cpp CodeGenModule.cpp
Chris Lattner
sabre at nondot.org
Tue Mar 30 20:36:01 PDT 2010
Author: lattner
Date: Tue Mar 30 22:36:01 2010
New Revision: 99983
URL: http://llvm.org/viewvc/llvm-project?rev=99983&view=rev
Log:
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.
Modified:
cfe/trunk/lib/CodeGen/CGDebugInfo.cpp
cfe/trunk/lib/CodeGen/CodeGenModule.cpp
Modified: cfe/trunk/lib/CodeGen/CGDebugInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGDebugInfo.cpp?rev=99983&r1=99982&r2=99983&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGDebugInfo.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGDebugInfo.cpp Tue Mar 30 22:36:01 2010
@@ -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,
Modified: cfe/trunk/lib/CodeGen/CodeGenModule.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CodeGenModule.cpp?rev=99983&r1=99982&r2=99983&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CodeGenModule.cpp (original)
+++ cfe/trunk/lib/CodeGen/CodeGenModule.cpp Tue Mar 30 22:36:01 2010
@@ -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();
}
}
More information about the cfe-commits
mailing list