summaryrefslogtreecommitdiffstats
path: root/clang/tools
diff options
context:
space:
mode:
Diffstat (limited to 'clang/tools')
-rw-r--r--clang/tools/CIndex/CIndex.cpp15
-rw-r--r--clang/tools/CIndex/CIndex.exports1
2 files changed, 16 insertions, 0 deletions
diff --git a/clang/tools/CIndex/CIndex.cpp b/clang/tools/CIndex/CIndex.cpp
index 8ce3db63d58..ddbdf531d0d 100644
--- a/clang/tools/CIndex/CIndex.cpp
+++ b/clang/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"
+
diff --git a/clang/tools/CIndex/CIndex.exports b/clang/tools/CIndex/CIndex.exports
index ebeab8ec2da..d349086b9c1 100644
--- a/clang/tools/CIndex/CIndex.exports
+++ b/clang/tools/CIndex/CIndex.exports
@@ -8,6 +8,7 @@ _clang_disposeString
_clang_disposeTranslationUnit
_clang_equalCursors
_clang_equalLocations
+_clang_getClangVersion
_clang_getCString
_clang_getCompletionChunkCompletionString
_clang_getCompletionChunkKind
OpenPOWER on IntegriCloud