File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -196,6 +196,17 @@ static SILInstruction *createDealloc(SILInstruction *Alloc,
196
196
return B.createDeallocStackRef (Location, cast<AllocRefInstBase>(Alloc));
197
197
case SILInstructionKind::AllocPackInst:
198
198
return B.createDeallocPack (Location, cast<AllocPackInst>(Alloc));
199
+ case SILInstructionKind::BuiltinInst: {
200
+ auto *bi = cast<BuiltinInst>(Alloc);
201
+ assert (bi->getBuiltinKind () == BuiltinValueKind::StackAlloc ||
202
+ bi->getBuiltinKind () == BuiltinValueKind::UnprotectedStackAlloc);
203
+ auto &context = Alloc->getFunction ()->getModule ().getASTContext ();
204
+ auto identifier =
205
+ context.getIdentifier (getBuiltinName (BuiltinValueKind::StackDealloc));
206
+ return B.createBuiltin (Location, identifier,
207
+ SILType::getEmptyTupleType (context),
208
+ SubstitutionMap (), {bi});
209
+ }
199
210
default :
200
211
llvm_unreachable (" unknown stack allocation" );
201
212
}
You can’t perform that action at this time.
0 commit comments