File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -78,7 +78,12 @@ llvm::Function *LocalVariableLifetimeAnnotator::getLLVMLifetimeStartFn() {
7878 if (lifetimeStartFunction)
7979 return lifetimeStartFunction;
8080
81- lifetimeStartFunction = llvm::Intrinsic::getDeclaration (
81+ lifetimeStartFunction = llvm::Intrinsic::
82+ #if LDC_LLVM_VER >= 2100
83+ getOrInsertDeclaration (
84+ #else
85+ getDeclaration (
86+ #endif
8287 &irs.module , llvm::Intrinsic::lifetime_start, allocaType);
8388 assert (lifetimeStartFunction);
8489 return lifetimeStartFunction;
@@ -89,7 +94,12 @@ llvm::Function *LocalVariableLifetimeAnnotator::getLLVMLifetimeEndFn() {
8994 if (lifetimeEndFunction)
9095 return lifetimeEndFunction;
9196
92- lifetimeEndFunction = llvm::Intrinsic::getDeclaration (
97+ lifetimeEndFunction = llvm::Intrinsic::
98+ #if LDC_LLVM_VER >= 2100
99+ getOrInsertDeclaration (
100+ #else
101+ getDeclaration (
102+ #endif
93103 &irs.module , llvm::Intrinsic::lifetime_end, allocaType);
94104 assert (lifetimeEndFunction);
95105 return lifetimeEndFunction;
You can’t perform that action at this time.
0 commit comments