summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAnton Korobeynikov <asl@math.spbu.ru>2009-08-05 09:31:40 +0000
committerAnton Korobeynikov <asl@math.spbu.ru>2009-08-05 09:31:40 +0000
commit0802a1e1e8e1b9746996f2b1441a63378b83c354 (patch)
tree5ac239c8c6be9ff5f6b0b952743136967997dd57 /lib
parente392c8336f18c1514f4c213550b7bb0ad6c56f64 (diff)
downloadllvm-0802a1e1e8e1b9746996f2b1441a63378b83c354.tar.gz
llvm-0802a1e1e8e1b9746996f2b1441a63378b83c354.tar.bz2
llvm-0802a1e1e8e1b9746996f2b1441a63378b83c354.tar.xz
Cleanup in dbg_stoppoint handling in CBE. Patch by Sandeep Patel.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78182 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/Target/CBackend/CBackend.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/lib/Target/CBackend/CBackend.cpp b/lib/Target/CBackend/CBackend.cpp
index 0feb87fd33..fffa2cbfe4 100644
--- a/lib/Target/CBackend/CBackend.cpp
+++ b/lib/Target/CBackend/CBackend.cpp
@@ -3160,16 +3160,15 @@ bool CWriter::visitBuiltinCall(CallInst &I, Intrinsic::ID ID,
case Intrinsic::dbg_stoppoint: {
// If we use writeOperand directly we get a "u" suffix which is rejected
// by gcc.
- std::stringstream SPIStr;
DbgStopPointInst &SPI = cast<DbgStopPointInst>(I);
- SPI.getDirectory()->print(SPIStr);
+ std::string dir;
+ GetConstantStringInfo(SPI.getDirectory(), dir);
+ std::string file;
+ GetConstantStringInfo(SPI.getFileName(), file);
Out << "\n#line "
<< SPI.getLine()
- << " \"";
- Out << SPIStr.str();
- SPIStr.clear();
- SPI.getFileName()->print(SPIStr);
- Out << SPIStr.str() << "\"\n";
+ << " \""
+ << dir << '/' << file << "\"\n";
return true;
}
case Intrinsic::x86_sse_cmp_ss: