Skip to content

Commit ec9476c

Browse files
committed
auto merge of #16520 : dotdash/rust/fix_llvm_before_36, r=thestinger
2 parents bc181f8 + f1f67b2 commit ec9476c

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/rustllvm/RustWrapper.cpp

+8
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,11 @@ extern "C" LLVMValueRef LLVMDIBuilderCreateSubroutineType(
282282
LLVMValueRef ParameterTypes) {
283283
return wrap(Builder->createSubroutineType(
284284
unwrapDI<DIFile>(File),
285+
#if LLVM_VERSION_MINOR >= 6
285286
unwrapDI<DITypeArray>(ParameterTypes)));
287+
#else
288+
unwrapDI<DIArray>(ParameterTypes)));
289+
#endif
286290
}
287291

288292
extern "C" LLVMValueRef LLVMDIBuilderCreateFunction(
@@ -634,7 +638,11 @@ extern "C" void LLVMDICompositeTypeSetTypeArray(
634638
LLVMValueRef CompositeType,
635639
LLVMValueRef TypeArray)
636640
{
641+
#if LLVM_VERSION_MINOR >= 6
637642
unwrapDI<DICompositeType>(CompositeType).setArrays(unwrapDI<DIArray>(TypeArray));
643+
#else
644+
unwrapDI<DICompositeType>(CompositeType).setTypeArray(unwrapDI<DIArray>(TypeArray));
645+
#endif
638646
}
639647

640648
extern "C" char *LLVMTypeToString(LLVMTypeRef Type) {

0 commit comments

Comments
 (0)