@@ -1254,45 +1254,6 @@ Address irgen::emitProjectValueInBuffer(IRGenFunction &IGF, SILType type,
12541254 return Address (addressOfValue, Alignment (1 ));
12551255}
12561256
1257- static llvm::Constant *getDeallocateValueInBufferFunction (IRGenModule &IGM) {
1258-
1259- llvm::Type *argTys[] = {IGM.TypeMetadataPtrTy , IGM.OpaquePtrTy };
1260-
1261- llvm::SmallString<40 > fnName (" __swift_deallocate_value_buffer" );
1262-
1263- return IGM.getOrCreateHelperFunction (
1264- fnName, IGM.VoidTy , argTys,
1265- [&](IRGenFunction &IGF) {
1266- auto it = IGF.CurFn ->arg_begin ();
1267- auto *metadata = &*(it++);
1268- auto buffer = Address (&*(it++), Alignment (1 ));
1269- auto &Builder = IGF.Builder ;
1270-
1271- // Dynamically check whether this type is inline or needs an allocation.
1272- llvm::Value *isInline, *flags;
1273- std::tie (isInline, flags) = emitLoadOfIsInline (IGF, metadata);
1274- auto *outlineBB = IGF.createBasicBlock (" outline.deallocateValueInBuffer" );
1275- auto *doneBB = IGF.createBasicBlock (" done" );
1276-
1277- Builder.CreateCondBr (isInline, doneBB, outlineBB);
1278-
1279- Builder.emitBlock (outlineBB);
1280- {
1281- auto *size = emitLoadOfSize (IGF, metadata);
1282- auto *alignMask = emitAlignMaskFromFlags (IGF, flags);
1283- auto *ptr = Builder.CreateLoad (Address (
1284- Builder.CreateBitCast (buffer.getAddress (), IGM.Int8PtrPtrTy ),
1285- buffer.getAlignment ()));
1286- IGF.emitDeallocRawCall (ptr, size, alignMask);
1287- Builder.CreateBr (doneBB);
1288- }
1289-
1290- Builder.emitBlock (doneBB);
1291- Builder.CreateRetVoid ();
1292- },
1293- true /* noinline*/ );
1294- }
1295-
12961257llvm::Value *
12971258irgen::emitGetEnumTagSinglePayloadGenericCall (IRGenFunction &IGF,
12981259 SILType payloadType,
0 commit comments