summaryrefslogtreecommitdiffstats
path: root/clang/lib/Basic/SourceLocation.cpp
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2012-12-12 14:17:17 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2012-12-12 14:17:17 +0000
commitadaf795fc95830a05835ce118c2b6b6f86ae69c3 (patch)
tree545867ff27a6108abb72b784b306a8ac915c0504 /clang/lib/Basic/SourceLocation.cpp
parent125939cbf781b770349f5378cd8091b2c0ae682e (diff)
downloadbcm5719-llvm-adaf795fc95830a05835ce118c2b6b6f86ae69c3.tar.gz
bcm5719-llvm-adaf795fc95830a05835ce118c2b6b6f86ae69c3.zip
PR14581: Make SourceLocation::printToString work, or it will always return an empty string.
No test case, this is debugging code. llvm-svn: 169980
Diffstat (limited to 'clang/lib/Basic/SourceLocation.cpp')
-rw-r--r--clang/lib/Basic/SourceLocation.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Basic/SourceLocation.cpp b/clang/lib/Basic/SourceLocation.cpp
index 0d62f7bb4b8..18220911796 100644
--- a/clang/lib/Basic/SourceLocation.cpp
+++ b/clang/lib/Basic/SourceLocation.cpp
@@ -65,7 +65,7 @@ std::string SourceLocation::printToString(const SourceManager &SM) const {
std::string S;
llvm::raw_string_ostream OS(S);
print(OS, SM);
- return S;
+ return OS.str();
}
void SourceLocation::dump(const SourceManager &SM) const {
OpenPOWER on IntegriCloud