diff options
author | neel <neel@FreeBSD.org> | 2012-12-04 04:37:42 +0000 |
---|---|---|
committer | neel <neel@FreeBSD.org> | 2012-12-04 04:37:42 +0000 |
commit | d8091074f2295a4be6817c9fe8802b9b0db9346d (patch) | |
tree | 6ef29583fd1f17922e7c5b7d49d2d96d8ff38ebb /contrib/llvm/tools/clang/lib/Basic/SourceLocation.cpp | |
parent | d45d8a8d668a9ee12073939bf775c404be8cf175 (diff) | |
parent | 6b76c5a1b878e8001537fb323cb0c88fca9dc2df (diff) | |
download | FreeBSD-src-d8091074f2295a4be6817c9fe8802b9b0db9346d.zip FreeBSD-src-d8091074f2295a4be6817c9fe8802b9b0db9346d.tar.gz |
IFC @r243836
Diffstat (limited to 'contrib/llvm/tools/clang/lib/Basic/SourceLocation.cpp')
-rw-r--r-- | contrib/llvm/tools/clang/lib/Basic/SourceLocation.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/contrib/llvm/tools/clang/lib/Basic/SourceLocation.cpp b/contrib/llvm/tools/clang/lib/Basic/SourceLocation.cpp index bb5a10a..0d62f7b 100644 --- a/contrib/llvm/tools/clang/lib/Basic/SourceLocation.cpp +++ b/contrib/llvm/tools/clang/lib/Basic/SourceLocation.cpp @@ -61,6 +61,13 @@ void SourceLocation::print(raw_ostream &OS, const SourceManager &SM)const{ OS << '>'; } +std::string SourceLocation::printToString(const SourceManager &SM) const { + std::string S; + llvm::raw_string_ostream OS(S); + print(OS, SM); + return S; +} + void SourceLocation::dump(const SourceManager &SM) const { print(llvm::errs(), SM); } |