summaryrefslogtreecommitdiffstats
path: root/llvm/bindings
diff options
context:
space:
mode:
authorPeter Collingbourne <peter@pcc.me.uk>2014-11-19 03:34:17 +0000
committerPeter Collingbourne <peter@pcc.me.uk>2014-11-19 03:34:17 +0000
commita8ed79ab2217ce993463147468fd8a7e4eb4d344 (patch)
treedb53b00655bb62c8e5d04b8295fa56a5f25bd9cb /llvm/bindings
parent13156b689e67e2857769f96adad141203d844e16 (diff)
downloadbcm5719-llvm-a8ed79ab2217ce993463147468fd8a7e4eb4d344.tar.gz
bcm5719-llvm-a8ed79ab2217ce993463147468fd8a7e4eb4d344.zip
Expose LLVM version string via macro in llvm-config.h, and modify Go bindings
to make use of it. llvm-svn: 222307
Diffstat (limited to 'llvm/bindings')
-rwxr-xr-xllvm/bindings/go/build.sh3
-rw-r--r--llvm/bindings/go/llvm/version.go20
2 files changed, 19 insertions, 4 deletions
diff --git a/llvm/bindings/go/build.sh b/llvm/bindings/go/build.sh
index 3f0be00f808..3177852aeba 100755
--- a/llvm/bindings/go/build.sh
+++ b/llvm/bindings/go/build.sh
@@ -26,6 +26,3 @@ else
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
diff --git a/llvm/bindings/go/llvm/version.go b/llvm/bindings/go/llvm/version.go
index 59385838faa..d0623be97a9 100644
--- a/llvm/bindings/go/llvm/version.go
+++ b/llvm/bindings/go/llvm/version.go
@@ -1,3 +1,21 @@
+//===- 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
OpenPOWER on IntegriCloud