to make use of it.
llvm-svn: 222307
AC_DEFINE_UNQUOTED([LLVM_VERSION_MAJOR], $LLVM_VERSION_MAJOR, [Major version of the LLVM API])
AC_DEFINE_UNQUOTED([LLVM_VERSION_MINOR], $LLVM_VERSION_MINOR, [Minor version of the LLVM API])
AC_DEFINE_UNQUOTED([LLVM_VERSION_PATCH], $LLVM_VERSION_PATCH, [Patch version of the LLVM API])
+AC_DEFINE_UNQUOTED([LLVM_VERSION_STRING], "$PACKAGE_VERSION", [LLVM version string])
AC_SUBST([LLVM_VERSION_MAJOR])
AC_SUBST([LLVM_VERSION_MINOR])
fi
$llvm_go print-config > $gollvmdir/llvm_config.go
-
-llvm_version="$($llvm_config --version)"
-printf "package llvm\n\nconst Version = \"%s\"\n" "$llvm_version" > $gollvmdir/version.go
+//===- version.go - LLVM version info -------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+//
+// This file defines LLVM version information.
+//
+//===----------------------------------------------------------------------===//
+
package llvm
-const Version = "3.6.0svn"
+/*
+#include "llvm/Config/llvm-config.h"
+*/
+import "C"
+
+const Version = C.LLVM_VERSION_STRING
_ACEOF
+cat >>confdefs.h <<_ACEOF
+#define LLVM_VERSION_STRING "$PACKAGE_VERSION"
+_ACEOF
+
+
/* Patch version of the LLVM API */
#undef LLVM_VERSION_PATCH
+/* LLVM version string */
+#undef LLVM_VERSION_STRING
+
/* The shared library extension */
#undef LTDL_SHLIB_EXT
/* Minor version of the LLVM API */
#cmakedefine LLVM_VERSION_MINOR ${LLVM_VERSION_MINOR}
+/* LLVM version string */
+#define LLVM_VERSION_STRING "${PACKAGE_VERSION}"
+
/* Define if we link Polly to the tools */
#cmakedefine LINK_POLLY_INTO_TOOLS
/* Minor version of the LLVM API */
#undef LLVM_VERSION_MINOR
+/* LLVM version string */
+#undef LLVM_VERSION_STRING
+
#endif