diff options
author | Ted Kremenek <kremenek@apple.com> | 2010-01-22 22:44:15 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2010-01-22 22:44:15 +0000 |
commit | 04bb716aea8fd2372ac10b0c640cabc5e5caa615 (patch) | |
tree | 2d0d7c430a386f7d9183ed1e0d7e25e5fded352b /lib/Basic/Version.cpp | |
parent | f9d3e9bb0052d2605d6b33d7de356d534457c9ac (diff) |
Add 'clang_getClangVersion()' function to CIndex. This exposes the full Clang version string through the CIndex API.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94242 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Basic/Version.cpp')
-rw-r--r-- | lib/Basic/Version.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Basic/Version.cpp b/lib/Basic/Version.cpp index 76d5cf244c..0521ab4889 100644 --- a/lib/Basic/Version.cpp +++ b/lib/Basic/Version.cpp @@ -71,7 +71,7 @@ llvm::StringRef getClangFullRepositoryVersion() { return buf; } -llvm::StringRef getClangFullVendorVersion() { +const char *getClangFullVendorVersion() { static std::string buf; if (buf.empty()) { llvm::raw_string_ostream OS(buf); @@ -81,7 +81,7 @@ llvm::StringRef getClangFullVendorVersion() { OS << "clang version " CLANG_VERSION_STRING " (" << getClangFullRepositoryVersion() << ')'; } - return buf; + return buf.c_str(); } } // end namespace clang |