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
diff --git a/tools/CIndex/CIndex.cpp b/tools/CIndex/CIndex.cpp
index 8ce3db6..ddbdf53 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 @@
   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"
+