mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-26 12:20:42 +00:00
Pass in a std::string when getting the names of debugging things. This cuts down
on the number of times a std::string is created and copied. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66396 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -59,8 +59,9 @@ void PrintDbgInfo::printVariableDeclaration(const Value *V)
|
||||
{
|
||||
if(const DbgDeclareInst* DDI = findDbgDeclare(V)) {
|
||||
DIVariable Var(cast<GlobalVariable>(DDI->getVariable()));
|
||||
Out << "; variable " << Var.getName()
|
||||
<< " of type " << Var.getType().getName()
|
||||
std::string Res1, Res2;
|
||||
Out << "; variable " << Var.getName(Res1)
|
||||
<< " of type " << Var.getType().getName(Res2)
|
||||
<< " at line " << Var.getLineNumber() << "\n";
|
||||
}
|
||||
}
|
||||
@@ -83,8 +84,9 @@ void PrintDbgInfo::printStopPoint(const DbgStopPointInst *DSI)
|
||||
void PrintDbgInfo::printFuncStart(const DbgFuncStartInst *FS)
|
||||
{
|
||||
DISubprogram Subprogram(cast<GlobalVariable>(FS->getSubprogram()));
|
||||
Out << ";fully qualified function name: " << Subprogram.getDisplayName()
|
||||
<< " return type: " << Subprogram.getType().getName()
|
||||
std::string Res1, Res2;
|
||||
Out << ";fully qualified function name: " << Subprogram.getDisplayName(Res1)
|
||||
<< " return type: " << Subprogram.getType().getName(Res2)
|
||||
<< " at line " << Subprogram.getLineNumber()
|
||||
<< "\n\n";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user