Skip to content

Commit 689cba7

Browse files
committed
Use version checks to not break LLVM < 16
1 parent bc73fa9 commit 689cba7

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

expr2/reactor/LLVMReactor.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -673,7 +673,11 @@ Value *Nucleus::allocateStackVariable(Type *type, int arraySize)
673673
declaration = new llvm::AllocaInst(T(type), 0, (llvm::Value *)nullptr, align);
674674
}
675675

676+
#if LLVM_VERSION_MAJOR >= 16
676677
declaration->insertInto(&entryBlock, entryBlock.begin());
678+
#else
679+
entryBlock.getInstList().push_front(declaration);
680+
#endif
677681

678682
return V(declaration);
679683
}

0 commit comments

Comments
 (0)