mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Merge remote-tracking branch 'origin/master' into master-next
This commit is contained in:
@@ -208,6 +208,20 @@ llvm::Value *IRGenFunction::emitProjectBoxCall(llvm::Value *box,
|
||||
return call;
|
||||
}
|
||||
|
||||
llvm::Value *IRGenFunction::emitAllocEmptyBoxCall() {
|
||||
llvm::Attribute::AttrKind attrKinds[] = {
|
||||
llvm::Attribute::NoUnwind,
|
||||
};
|
||||
auto attrs = llvm::AttributeSet::get(IGM.LLVMContext,
|
||||
llvm::AttributeSet::FunctionIndex,
|
||||
attrKinds);
|
||||
llvm::CallInst *call =
|
||||
Builder.CreateCall(IGM.getAllocEmptyBoxFn(), {});
|
||||
call->setCallingConv(IGM.DefaultCC);
|
||||
call->setAttributes(attrs);
|
||||
return call;
|
||||
}
|
||||
|
||||
static void emitDeallocatingCall(IRGenFunction &IGF, llvm::Constant *fn,
|
||||
std::initializer_list<llvm::Value *> args) {
|
||||
auto cc = IGF.IGM.DefaultCC;
|
||||
|
||||
Reference in New Issue
Block a user