Author: akirtzidis Date: Mon Oct 29 18:24:44 2012 New Revision: 166980 URL: http://llvm.org/viewvc/llvm-project?rev=166980&view=rev Log: [libclang] Introduce a version constant for the libclang API.
rdar://12587974 Modified: cfe/trunk/include/clang-c/Index.h Modified: cfe/trunk/include/clang-c/Index.h URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang-c/Index.h?rev=166980&r1=166979&r2=166980&view=diff ============================================================================== --- cfe/trunk/include/clang-c/Index.h (original) +++ cfe/trunk/include/clang-c/Index.h Mon Oct 29 18:24:44 2012 @@ -23,6 +23,26 @@ #include "clang-c/Platform.h" #include "clang-c/CXString.h" +#define CINDEX_VERSION_MAJOR 0 +#define CINDEX_VERSION_MINOR 1 + +#define CINDEX_VERSION_ENCODE(major, minor) ( \ + ((major) * 10000) \ + + ((minor) * 1)) + +#define CINDEX_VERSION CINDEX_VERSION_ENCODE( \ + CINDEX_VERSION_MAJOR, \ + CINDEX_VERSION_MINOR ) + +#define CINDEX_VERSION_STRINGIZE_(major, minor) \ + #major"."#minor +#define CINDEX_VERSION_STRINGIZE(major, minor) \ + CINDEX_VERSION_STRINGIZE_(major, minor) + +#define CINDEX_VERSION_STRING CINDEX_VERSION_STRINGIZE( \ + CINDEX_VERSION_MAJOR, \ + CINDEX_VERSION_MINOR) + #ifdef __cplusplus extern "C" { #endif _______________________________________________ cfe-commits mailing list cfe-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits