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
This commit is contained in:
Chris Lattner 2010-03-31 03:36:01 +00:00
parent 009de335ac
commit be49c03ff4
2 changed files with 4 additions and 4 deletions

View File

@ -1602,7 +1602,7 @@ void CGDebugInfo::EmitDeclare(const VarDecl *VD, unsigned Tag,
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 @@ void CGDebugInfo::EmitDeclare(const BlockDeclRefExpr *BDRE, unsigned Tag,
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,

View File

@ -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();
}
}