summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorReid Kleckner <reid@kleckner.net>2015-02-17 20:02:34 +0000
committerReid Kleckner <reid@kleckner.net>2015-02-17 20:02:34 +0000
commit9d6eb573d7e760626401008b590a6eaeb1508c18 (patch)
treea90c8ec6994d7a247a2db31c202c8d9d0f902285
parenta49d68e0784c46c42b8668e7b7def4caa7cf0778 (diff)
downloadbcm5719-llvm-9d6eb573d7e760626401008b590a6eaeb1508c18.tar.gz
bcm5719-llvm-9d6eb573d7e760626401008b590a6eaeb1508c18.zip
Expose LLVM_VERSION_PATCH in llvm-config.h
There was no reason to keep this private in config.h, and users requested that it be available in PR22615. Also fix a bug where patch versions of '0' would cause the macro to remain undefined. The "#cmakedefine" command only creates a macro if the named variable would be considered true in the context of an if(). llvm-svn: 229529
-rw-r--r--llvm/include/llvm/Config/config.h.cmake3
-rw-r--r--llvm/include/llvm/Config/llvm-config.h.cmake7
-rw-r--r--llvm/include/llvm/Config/llvm-config.h.in3
3 files changed, 8 insertions, 5 deletions
diff --git a/llvm/include/llvm/Config/config.h.cmake b/llvm/include/llvm/Config/config.h.cmake
index e10df045b4b..32d0735628f 100644
--- a/llvm/include/llvm/Config/config.h.cmake
+++ b/llvm/include/llvm/Config/config.h.cmake
@@ -6,9 +6,6 @@
/* Exported configuration */
#include "llvm/Config/llvm-config.h"
-/* Patch version of the LLVM API */
-#cmakedefine LLVM_VERSION_PATCH ${LLVM_VERSION_PATCH}
-
/* Bug report URL. */
#define BUG_REPORT_URL "${BUG_REPORT_URL}"
diff --git a/llvm/include/llvm/Config/llvm-config.h.cmake b/llvm/include/llvm/Config/llvm-config.h.cmake
index 77201e6330b..d54003d993a 100644
--- a/llvm/include/llvm/Config/llvm-config.h.cmake
+++ b/llvm/include/llvm/Config/llvm-config.h.cmake
@@ -87,10 +87,13 @@
#cmakedefine LLVM_USE_OPROFILE 1
/* Major version of the LLVM API */
-#cmakedefine LLVM_VERSION_MAJOR ${LLVM_VERSION_MAJOR}
+#define LLVM_VERSION_MAJOR ${LLVM_VERSION_MAJOR}
/* Minor version of the LLVM API */
-#cmakedefine LLVM_VERSION_MINOR ${LLVM_VERSION_MINOR}
+#define LLVM_VERSION_MINOR ${LLVM_VERSION_MINOR}
+
+/* Patch version of the LLVM API */
+#define LLVM_VERSION_PATCH ${LLVM_VERSION_PATCH}
/* LLVM version string */
#define LLVM_VERSION_STRING "${PACKAGE_VERSION}"
diff --git a/llvm/include/llvm/Config/llvm-config.h.in b/llvm/include/llvm/Config/llvm-config.h.in
index 2d6add71a4e..25a92954483 100644
--- a/llvm/include/llvm/Config/llvm-config.h.in
+++ b/llvm/include/llvm/Config/llvm-config.h.in
@@ -92,6 +92,9 @@
/* Minor version of the LLVM API */
#undef LLVM_VERSION_MINOR
+/* Patch version of the LLVM API */
+#undef LLVM_VERSION_PATCH
+
/* LLVM version string */
#undef LLVM_VERSION_STRING
OpenPOWER on IntegriCloud