diff options
author | Bill Wendling <isanbard@gmail.com> | 2009-03-09 05:04:40 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2009-03-09 05:04:40 +0000 |
commit | ccbdc7ab82792ac5d7863ef086f11fb010d88073 (patch) | |
tree | 8fd761b3482c8df9272eac68f507776b394f2d32 /lib/Analysis/DbgInfoPrinter.cpp | |
parent | bce6091d95b7fd56d7c6760b0de54fb6c4300539 (diff) | |
download | llvm-ccbdc7ab82792ac5d7863ef086f11fb010d88073.tar.gz llvm-ccbdc7ab82792ac5d7863ef086f11fb010d88073.tar.bz2 llvm-ccbdc7ab82792ac5d7863ef086f11fb010d88073.tar.xz |
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
Diffstat (limited to 'lib/Analysis/DbgInfoPrinter.cpp')
-rw-r--r-- | lib/Analysis/DbgInfoPrinter.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/Analysis/DbgInfoPrinter.cpp b/lib/Analysis/DbgInfoPrinter.cpp index 522e98ff01..127f931b6e 100644 --- a/lib/Analysis/DbgInfoPrinter.cpp +++ b/lib/Analysis/DbgInfoPrinter.cpp @@ -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"; } |