From f1f67b2848f3c8d7c8c82faa4956ce0591b2e71a Mon Sep 17 00:00:00 2001 From: Björn Steinbrink Date: Fri, 15 Aug 2014 16:36:05 +0200 Subject: Fix builds with LLVM < 3.6 --- src/rustllvm/RustWrapper.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/rustllvm/RustWrapper.cpp') 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(File), +#if LLVM_VERSION_MINOR >= 6 unwrapDI(ParameterTypes))); +#else + unwrapDI(ParameterTypes))); +#endif } extern "C" LLVMValueRef LLVMDIBuilderCreateFunction( @@ -634,7 +638,11 @@ extern "C" void LLVMDICompositeTypeSetTypeArray( LLVMValueRef CompositeType, LLVMValueRef TypeArray) { +#if LLVM_VERSION_MINOR >= 6 unwrapDI(CompositeType).setArrays(unwrapDI(TypeArray)); +#else + unwrapDI(CompositeType).setTypeArray(unwrapDI(TypeArray)); +#endif } extern "C" char *LLVMTypeToString(LLVMTypeRef Type) { -- cgit 1.4.1-3-g733a5