From 21fa5d182f7b0b65c8233d6e228fc374d6d6e8bb Mon Sep 17 00:00:00 2001 From: Benjamin Kramer Date: Wed, 12 Dec 2012 14:17:17 +0000 Subject: [PATCH] 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 --- lib/Basic/SourceLocation.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 { -- 2.50.1