about summary refs log tree commit diff
path: root/src/rustllvm/RustWrapper.cpp
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2014-03-05 15:14:16 -0800
committerAlex Crichton <alex@alexcrichton.com>2014-03-05 18:05:05 -0800
commit93964525922f5b13cbc3b0a28175082acf50f587 (patch)
treeb9949f4bde026f500bbb08e709fcb0959c7ede50 /src/rustllvm/RustWrapper.cpp
parent8a55cd988f272ec70fc7d5adf6e61ed8ee6a8e78 (diff)
downloadrust-93964525922f5b13cbc3b0a28175082acf50f587.tar.gz
rust-93964525922f5b13cbc3b0a28175082acf50f587.zip
rustc: Fix support for LLVM 3.3
The llvm.copysign and llvm.round intrinsics weren't added until LLVM 3.4, so if
we're on LLVM 3.3 we lower these to calls in libm instead of LLVM intrinsics.

This should fix our travis failures.
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
-rw-r--r--src/rustllvm/RustWrapper.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/rustllvm/RustWrapper.cpp b/src/rustllvm/RustWrapper.cpp
index d8fc5b15850..aaaf512bcf3 100644
--- a/src/rustllvm/RustWrapper.cpp
+++ b/src/rustllvm/RustWrapper.cpp
@@ -652,3 +652,8 @@ LLVMRustSetDLLExportStorageClass(LLVMValueRef Value) {
     LLVMSetLinkage(Value, LLVMDLLExportLinkage);
 }
 #endif
+
+extern "C" int
+LLVMVersionMinor() {
+    return LLVM_VERSION_MINOR;
+}