summaryrefslogtreecommitdiffstats
path: root/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
commit21fa5d182f7b0b65c8233d6e228fc374d6d6e8bb (patch)
treee671c7513d63c814304c08248f3f35e83f235375 /lib/Basic/SourceLocation.cpp
parentacaf110ec9f2622f76f32c23fd0c2488952bdd21 (diff)
PR14581: Make SourceLocation::printToString work, or it will always return an empty string.
No test case, this is debugging code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169980 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Basic/SourceLocation.cpp')
-rw-r--r--lib/Basic/SourceLocation.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Basic/SourceLocation.cpp b/lib/Basic/SourceLocation.cpp
index 0d62f7bb4b..1822091179 100644
--- a/lib/Basic/SourceLocation.cpp
+++ b/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 {