Skip to content

Commit 3ced358

Browse files
authored
Merge pull request swiftlang#27897 from apple/remove-todo-wip
remove todo warnings, oops
2 parents d074033 + dc0f770 commit 3ced358

File tree

15 files changed

+0
-19
lines changed

15 files changed

+0
-19
lines changed

lib/AST/ASTDemangler.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -505,7 +505,6 @@ Type ASTBuilder::createImplFunctionType(
505505
auto conv = getResultConvention(errorResult->getConvention());
506506
funcErrorResult.emplace(type, conv);
507507
}
508-
#warning "todo: demangle substituted silfunctiontype fields"
509508
return SILFunctionType::get(genericSig, einfo, funcCoroutineKind,
510509
funcCalleeConvention, funcParams, funcYields,
511510
funcResults, funcErrorResult,

lib/AST/ASTMangler.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -357,7 +357,6 @@ std::string ASTMangler::mangleReabstractionThunkHelper(
357357
Type SelfType,
358358
ModuleDecl *Module) {
359359
Mod = Module;
360-
#warning "todo: mangle substituted types"
361360
assert(ThunkType->getSubstitutions().empty() && "not implemented");
362361
GenericSignature GenSig = ThunkType->getSubstGenericSignature();
363362
if (GenSig)
@@ -1425,7 +1424,6 @@ static char getResultConvention(ResultConvention conv) {
14251424
};
14261425

14271426
void ASTMangler::appendImplFunctionType(SILFunctionType *fn) {
1428-
#warning "todo: handle substituted types"
14291427

14301428
llvm::SmallVector<char, 32> OpArgs;
14311429

lib/SIL/SILBuilder.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ SILType SILBuilder::getPartialApplyResultType(SILType origTy, unsigned argCount,
5454
SubstitutionMap subs,
5555
ParameterConvention calleeConvention,
5656
PartialApplyInst::OnStackKind onStack) {
57-
#warning "todo: preserve substitution through partial apply?"
5857
CanSILFunctionType FTI = origTy.castTo<SILFunctionType>();
5958
if (!subs.empty())
6059
FTI = FTI->substGenericArgs(M, subs);

lib/SIL/SILFunction.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ SILSpecializeAttr *SILSpecializeAttr::create(SILModule &M,
4444
}
4545

4646
void SILFunction::addSpecializeAttr(SILSpecializeAttr *Attr) {
47-
#warning "todo: base on decl type params?"
4847
if (getLoweredFunctionType()->getInvocationGenericSignature()) {
4948
Attr->F = this;
5049
SpecializeAttrSet.push_back(Attr);

lib/SIL/SILFunctionType.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1059,7 +1059,6 @@ static CanSILFunctionType getSILFunctionType(
10591059
.withIsPseudogeneric(pseudogeneric)
10601060
.withNoEscape(extInfo.isNoEscape());
10611061

1062-
#warning "todo: substituted function types?"
10631062

10641063
return SILFunctionType::get(genericSig, silExtInfo, coroutineKind,
10651064
calleeConvention, inputs, yields,
@@ -2588,7 +2587,6 @@ SILFunctionType::substGenericArgs(SILModule &silModule,
25882587
TypeSubstitutionFn subs,
25892588
LookupConformanceFn conformances) {
25902589
if (!isPolymorphic()) return CanSILFunctionType(this);
2591-
#warning "todo: should produce a substituted function type"
25922590
SILTypeSubstituter substituter(silModule.Types, subs, conformances,
25932591
getSubstGenericSignature(),
25942592
/*shouldSubstituteOpaqueTypes*/ false);

lib/SILGen/SILGen.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -418,7 +418,6 @@ SILGenModule::getKeyPathProjectionCoroutine(bool isReadAccess,
418418
/*pseudogeneric*/false,
419419
/*non-escaping*/false);
420420

421-
#warning "todo: should be a substituted function type of the common key path interface"
422421
auto functionTy = SILFunctionType::get(sig, extInfo,
423422
SILCoroutineKind::YieldOnce,
424423
ParameterConvention::Direct_Unowned,

lib/SILGen/SILGenBridging.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,6 @@ emitBridgeObjectiveCToNative(SILGenFunction &SGF,
201201
auto witnessFnTy = witnessRef->getType().castTo<SILFunctionType>();
202202

203203
CanType swiftValueType = conformance->getType()->getCanonicalType();
204-
#warning "todo: preserve substituted type?"
205204
auto genericSig = witnessFnTy->getInvocationGenericSignature();
206205
SubstitutionMap typeSubMap = witness.getSubstitutions();
207206

@@ -549,7 +548,6 @@ ManagedValue SILGenFunction::emitFuncToBlock(SILLocation loc,
549548
GenericEnvironment *genericEnv = nullptr;
550549
SubstitutionMap subs;
551550
if (funcType->hasArchetype() || blockType->hasArchetype()) {
552-
#warning "todo: preserve substitution?"
553551
genericSig = F.getLoweredFunctionType()->getInvocationGenericSignature();
554552
genericEnv = F.getGenericEnvironment();
555553

lib/SILGen/SILGenExpr.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2666,7 +2666,6 @@ static SILFunction *getOrCreateKeyPathGetter(SILGenModule &SGM,
26662666

26672667
SILResultInfo result(loweredPropTy, ResultConvention::Indirect);
26682668

2669-
#warning "todo: should be a substituted function type of the common key path interface type"
26702669
auto signature = SILFunctionType::get(genericSig,
26712670
SILFunctionType::ExtInfo(SILFunctionType::Representation::Thin,
26722671
/*pseudogeneric*/ false,

lib/SILGen/SILGenPoly.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,6 @@
103103
using namespace swift;
104104
using namespace Lowering;
105105

106-
#warning "todo: handle substitutions throughout this file--audit CanSILFunctionType() and getInterfaceType() calls"
107106

108107
/// A helper function that pulls an element off the front of an array.
109108
template <class T>

lib/SILOptimizer/FunctionSignatureTransforms/FunctionSignatureOpts.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,6 @@ FunctionSignatureTransformDescriptor::createOptimizedSILFunctionName() {
203203
static bool usesGenerics(SILFunction *F,
204204
ArrayRef<SILParameterInfo> InterfaceParams,
205205
ArrayRef<SILResultInfo> InterfaceResults) {
206-
#warning "todo: rework for subst function types and silfunction generic sigs"
207206
CanSILFunctionType FTy = F->getLoweredFunctionType();
208207
auto HasGenericSignature = FTy->getSubstGenericSignature() != nullptr;
209208
if (!HasGenericSignature)

0 commit comments

Comments
 (0)