aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/SelectionDAG/FastISel.cpp
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2009-03-09 05:04:40 +0000
committerBill Wendling <isanbard@gmail.com>2009-03-09 05:04:40 +0000
commitccbdc7ab82792ac5d7863ef086f11fb010d88073 (patch)
tree8fd761b3482c8df9272eac68f507776b394f2d32 /lib/CodeGen/SelectionDAG/FastISel.cpp
parentbce6091d95b7fd56d7c6760b0de54fb6c4300539 (diff)
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/CodeGen/SelectionDAG/FastISel.cpp')
-rw-r--r--lib/CodeGen/SelectionDAG/FastISel.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/CodeGen/SelectionDAG/FastISel.cpp b/lib/CodeGen/SelectionDAG/FastISel.cpp
index a0ed4755f9..229376d293 100644
--- a/lib/CodeGen/SelectionDAG/FastISel.cpp
+++ b/lib/CodeGen/SelectionDAG/FastISel.cpp
@@ -319,8 +319,9 @@ bool FastISel::SelectCall(User *I) {
DbgStopPointInst *SPI = cast<DbgStopPointInst>(I);
if (DW && DW->ValidDebugInfo(SPI->getContext())) {
DICompileUnit CU(cast<GlobalVariable>(SPI->getContext()));
- unsigned SrcFile = DW->getOrCreateSourceID(CU.getDirectory(),
- CU.getFilename());
+ std::string Dir, FN;
+ unsigned SrcFile = DW->getOrCreateSourceID(CU.getDirectory(Dir),
+ CU.getFilename(FN));
unsigned Line = SPI->getLine();
unsigned Col = SPI->getColumn();
unsigned ID = DW->RecordSourceLine(Line, Col, SrcFile);
@@ -361,8 +362,9 @@ bool FastISel::SelectCall(User *I) {
// (most?) gdb expects.
DISubprogram Subprogram(cast<GlobalVariable>(SP));
DICompileUnit CompileUnit = Subprogram.getCompileUnit();
- unsigned SrcFile = DW->getOrCreateSourceID(CompileUnit.getDirectory(),
- CompileUnit.getFilename());
+ std::string Dir, FN;
+ unsigned SrcFile = DW->getOrCreateSourceID(CompileUnit.getDirectory(Dir),
+ CompileUnit.getFilename(FN));
// Record the source line but does not create a label for the normal
// function start. It will be emitted at asm emission time. However,