aboutsummaryrefslogtreecommitdiff
path: root/tools/CIndex/CIndex.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2010-01-22 22:44:15 +0000
committerTed Kremenek <kremenek@apple.com>2010-01-22 22:44:15 +0000
commit04bb716aea8fd2372ac10b0c640cabc5e5caa615 (patch)
tree2d0d7c430a386f7d9183ed1e0d7e25e5fded352b /tools/CIndex/CIndex.cpp
parentf9d3e9bb0052d2605d6b33d7de356d534457c9ac (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 'tools/CIndex/CIndex.cpp')
-rw-r--r--tools/CIndex/CIndex.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/tools/CIndex/CIndex.cpp b/tools/CIndex/CIndex.cpp
index 8ce3db63d5..ddbdf531d0 100644
--- a/tools/CIndex/CIndex.cpp
+++ b/tools/CIndex/CIndex.cpp
@@ -15,6 +15,7 @@
#include "CIndexer.h"
#include "CXCursor.h"
+#include "clang/Basic/Version.h"
#include "clang/AST/DeclVisitor.h"
#include "clang/AST/StmtVisitor.h"
#include "clang/AST/TypeLocVisitor.h"
@@ -1791,4 +1792,18 @@ void clang_disposeString(CXString string) {
if (string.MustFreeString && string.Spelling)
free((void*)string.Spelling);
}
+
} // end: extern "C"
+
+//===----------------------------------------------------------------------===//
+// Misc. utility functions.
+//===----------------------------------------------------------------------===//
+
+extern "C" {
+
+const char *clang_getClangVersion() {
+ return getClangFullVendorVersion();
+}
+
+} // end: extern "C"
+