|
@@ -924,7 +924,7 @@ llvm::Value *CodeGenFunction::EmitLifetimeStart(uint64_t Size,
|
|
|
return nullptr;
|
|
|
|
|
|
llvm::Value *SizeV = llvm::ConstantInt::get(Int64Ty, Size);
|
|
|
- Addr = Builder.CreateBitCast(Addr, Int8PtrTy);
|
|
|
+ Addr = Builder.CreateBitCast(Addr, AllocaInt8PtrTy);
|
|
|
llvm::CallInst *C =
|
|
|
Builder.CreateCall(CGM.getLLVMLifetimeStartFn(), {SizeV, Addr});
|
|
|
C->setDoesNotThrow();
|
|
@@ -932,7 +932,7 @@ llvm::Value *CodeGenFunction::EmitLifetimeStart(uint64_t Size,
|
|
|
}
|
|
|
|
|
|
void CodeGenFunction::EmitLifetimeEnd(llvm::Value *Size, llvm::Value *Addr) {
|
|
|
- Addr = Builder.CreateBitCast(Addr, Int8PtrTy);
|
|
|
+ Addr = Builder.CreateBitCast(Addr, AllocaInt8PtrTy);
|
|
|
llvm::CallInst *C =
|
|
|
Builder.CreateCall(CGM.getLLVMLifetimeEndFn(), {Size, Addr});
|
|
|
C->setDoesNotThrow();
|
|
@@ -1728,7 +1728,7 @@ llvm::Constant *CodeGenModule::getLLVMLifetimeStartFn() {
|
|
|
if (LifetimeStartFn)
|
|
|
return LifetimeStartFn;
|
|
|
LifetimeStartFn = llvm::Intrinsic::getDeclaration(&getModule(),
|
|
|
- llvm::Intrinsic::lifetime_start, Int8PtrTy);
|
|
|
+ llvm::Intrinsic::lifetime_start, AllocaInt8PtrTy);
|
|
|
return LifetimeStartFn;
|
|
|
}
|
|
|
|
|
@@ -1737,7 +1737,7 @@ llvm::Constant *CodeGenModule::getLLVMLifetimeEndFn() {
|
|
|
if (LifetimeEndFn)
|
|
|
return LifetimeEndFn;
|
|
|
LifetimeEndFn = llvm::Intrinsic::getDeclaration(&getModule(),
|
|
|
- llvm::Intrinsic::lifetime_end, Int8PtrTy);
|
|
|
+ llvm::Intrinsic::lifetime_end, AllocaInt8PtrTy);
|
|
|
return LifetimeEndFn;
|
|
|
}
|
|
|
|