Skip to content

Commit 399e90e

Browse files
authored
Merge pull request #39659 from atrick/fix-warn
2 parents e845af8 + aace0e8 commit 399e90e

File tree

2 files changed

+0
-40
lines changed

2 files changed

+0
-40
lines changed

lib/IDE/CodeCompletion.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6623,7 +6623,6 @@ static void deliverCompletionResults(CodeCompletionContext &CompletionContext,
66236623
// ModuleFilename can be empty if something strange happened during
66246624
// module loading, for example, the module file is corrupted.
66256625
if (!ModuleFilename.empty()) {
6626-
auto &Ctx = TheModule->getASTContext();
66276626
CodeCompletionCache::Key K{
66286627
ModuleFilename.str(),
66296628
std::string(TheModule->getName()),

lib/IRGen/GenOpaque.cpp

Lines changed: 0 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -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-
12961257
llvm::Value *
12971258
irgen::emitGetEnumTagSinglePayloadGenericCall(IRGenFunction &IGF,
12981259
SILType payloadType,

0 commit comments

Comments
 (0)