about summary refs log tree commit diff
path: root/src/rustllvm/RustWrapper.cpp
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2014-08-16 08:56:11 +0000
committerbors <bors@rust-lang.org>2014-08-16 08:56:11 +0000
commitec9476cd63af58d55e552532d14040d972392bd6 (patch)
tree904122117286499f965dfc7774795f50d6e32bda /src/rustllvm/RustWrapper.cpp
parentbc181f807523e4e14540a7031039e04a7d1be067 (diff)
parentf1f67b2848f3c8d7c8c82faa4956ce0591b2e71a (diff)
downloadrust-ec9476cd63af58d55e552532d14040d972392bd6.tar.gz
rust-ec9476cd63af58d55e552532d14040d972392bd6.zip
auto merge of #16520 : dotdash/rust/fix_llvm_before_36, r=thestinger
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
-rw-r--r--src/rustllvm/RustWrapper.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/rustllvm/RustWrapper.cpp b/src/rustllvm/RustWrapper.cpp
index 8051235da20..cdd36d7f458 100644
--- a/src/rustllvm/RustWrapper.cpp
+++ b/src/rustllvm/RustWrapper.cpp
@@ -282,7 +282,11 @@ extern "C" LLVMValueRef LLVMDIBuilderCreateSubroutineType(
     LLVMValueRef ParameterTypes) {
     return wrap(Builder->createSubroutineType(
         unwrapDI<DIFile>(File),
+#if LLVM_VERSION_MINOR >= 6
         unwrapDI<DITypeArray>(ParameterTypes)));
+#else
+        unwrapDI<DIArray>(ParameterTypes)));
+#endif
 }
 
 extern "C" LLVMValueRef LLVMDIBuilderCreateFunction(
@@ -634,7 +638,11 @@ extern "C" void LLVMDICompositeTypeSetTypeArray(
     LLVMValueRef CompositeType,
     LLVMValueRef TypeArray)
 {
+#if LLVM_VERSION_MINOR >= 6
     unwrapDI<DICompositeType>(CompositeType).setArrays(unwrapDI<DIArray>(TypeArray));
+#else
+    unwrapDI<DICompositeType>(CompositeType).setTypeArray(unwrapDI<DIArray>(TypeArray));
+#endif
 }
 
 extern "C" char *LLVMTypeToString(LLVMTypeRef Type) {