Make the following functions thread-safe but having them return an std::string that is reconstructed
every time they are called:
getClangRevision()
getClangFullRepositoryVersion()
getClangFullVersion()
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96033 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/tools/CIndex/CIndex.cpp b/tools/CIndex/CIndex.cpp
index dc1608b..8d887eb 100644
--- a/tools/CIndex/CIndex.cpp
+++ b/tools/CIndex/CIndex.cpp
@@ -2169,8 +2169,8 @@
extern "C" {
-const char *clang_getClangVersion() {
- return getClangFullVersion();
+CXString clang_getClangVersion() {
+ return CIndexer::createCXString(getClangFullVersion(), true);
}
} // end: extern "C"