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/CodeGen/SelectionDAG/LegalizeDAG.cpp | |
parent | bce6091d95b7fd56d7c6760b0de54fb6c4300539 (diff) | |
download | external_llvm-ccbdc7ab82792ac5d7863ef086f11fb010d88073.zip external_llvm-ccbdc7ab82792ac5d7863ef086f11fb010d88073.tar.gz external_llvm-ccbdc7ab82792ac5d7863ef086f11fb010d88073.tar.bz2 |
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/LegalizeDAG.cpp')
-rw-r--r-- | lib/CodeGen/SelectionDAG/LegalizeDAG.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp b/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp index 0854aad..8c074e7 100644 --- a/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp +++ b/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp @@ -1287,8 +1287,9 @@ SDValue SelectionDAGLegalize::LegalizeOp(SDValue Op) { GlobalVariable *CU_GV = cast<GlobalVariable>(DSP->getCompileUnit()); if (DW && (useDEBUG_LOC || useLABEL) && !CU_GV->isDeclaration()) { DICompileUnit CU(cast<GlobalVariable>(DSP->getCompileUnit())); - unsigned SrcFile = DW->getOrCreateSourceID(CU.getDirectory(), - CU.getFilename()); + std::string Dir, FN; + unsigned SrcFile = DW->getOrCreateSourceID(CU.getDirectory(Dir), + CU.getFilename(FN)); unsigned Line = DSP->getLine(); unsigned Col = DSP->getColumn(); |