--- include/llvm-c/Core.h (revision 132133) +++ include/llvm-c/Core.h (working copy) @@ -290,6 +290,11 @@ void LLVMDisposeMessage(char *Message); +/*===-- Version -----------------------------------------------------------===*/ + +const char* LLVMGetVersion(int ShowRepositoryRevision); + + /*===-- Contexts ----------------------------------------------------------===*/ /* Create and destroy contexts. */ --- lib/VMCore/Core.cpp (revision 132133) +++ lib/VMCore/Core.cpp (working copy) @@ -53,7 +53,16 @@ free(Message); } +/*===-- Version -----------------------------------------------------------===*/ +const char * LLVMGetVersion(int ShowRepositoryRevision) { + if (ShowRepositoryRevision) { + return REPOSITORY_REVISION; + } else { + return PACKAGE_VERSION; + } +} + /*===-- Operations on contexts --------------------------------------------===*/ LLVMContextRef LLVMContextCreate() { --- lib/VMCore/Core.cpp (revision 132133) +++ lib/VMCore/Core.cpp (working copy) @@ -53,7 +53,16 @@ free(Message); } +/*===-- Version -----------------------------------------------------------===*/ +const char * LLVMGetVersion(int ShowRepositoryRevision) { + if (ShowRepositoryRevision) { + return REPOSITORY_REVISION; + } else { + return PACKAGE_VERSION; + } +} + /*===-- Operations on contexts --------------------------------------------===*/ LLVMContextRef LLVMContextCreate() {