Skip to content

Commit 6a68525

Browse files
authored
Merge pull request #33124 from varungandhi-apple/vg-consistent-note-style
2 parents 90f0f7c + 1ddf4ff commit 6a68525

File tree

13 files changed

+25
-30
lines changed

13 files changed

+25
-30
lines changed

include/swift/AST/PrintOptions.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -327,8 +327,7 @@ struct PrintOptions {
327327
};
328328

329329
/// Whether to print function @convention attribute on function types.
330-
// FIXME: [clang-function-type-serialization] Once we start serializing Clang
331-
// types, we should also start printing the full type in the swiftinterface.
330+
// [TODO: Clang-type-plumbing] Print the full type in the swiftinterface.
332331
FunctionRepresentationMode PrintFunctionRepresentationAttrs =
333332
FunctionRepresentationMode::NameOnly;
334333

include/swift/AST/Types.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3013,8 +3013,7 @@ class AnyFunctionType : public TypeBase {
30133013
static void assertIsFunctionType(const clang::Type *);
30143014

30153015
ExtInfo(unsigned Bits, Uncommon Other) : Bits(Bits), Other(Other) {
3016-
// TODO: [clang-function-type-serialization] Once we start serializing
3017-
// the Clang type, we should also assert that the pointer is non-null.
3016+
// [TODO: Clang-type-plumbing] Assert that the pointer is non-null.
30183017
auto Rep = Representation(Bits & RepresentationMask);
30193018
if ((Rep == Representation::CFunctionPointer) && Other.ClangFunctionType)
30203019
assertIsFunctionType(Other.ClangFunctionType);
@@ -4372,7 +4371,7 @@ class SILFunctionType final : public TypeBase, public llvm::FoldingSetNode,
43724371
unsigned NumAnyResults : 16; // Not including the ErrorResult.
43734372
unsigned NumAnyIndirectFormalResults : 16; // Subset of NumAnyResults.
43744373

4375-
// [SILFunctionType-layout]
4374+
// [NOTE: SILFunctionType-layout]
43764375
// The layout of a SILFunctionType in memory is:
43774376
// SILFunctionType
43784377
// SILParameterInfo[NumParameters]

include/swift/Basic/LangOptions.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -274,8 +274,7 @@ namespace swift {
274274
/// Use Clang function types for computing canonical types.
275275
/// If this option is false, the clang function types will still be computed
276276
/// but will not be used for checking type equality.
277-
/// FIXME: [clang-function-type-serialization] This option should be turned
278-
/// on once we start serializing clang function types.
277+
/// [TODO: Clang-type-plumbing] Turn on for feature rollout.
279278
bool UseClangFunctionTypes = false;
280279

281280
/// Whether to use the import as member inference system

include/swift/Frontend/ModuleInterfaceSupport.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ struct ModuleInterfaceOptions {
3333
bool PreserveTypesAsWritten = false;
3434

3535
/// Should we emit the cType when printing @convention(c) or no?
36-
/// FIXME: [clang-function-type-serialization] This check should go away.
36+
/// [TODO: Clang-type-plumbing] This check should go away.
3737
bool PrintFullConvention = false;
3838

3939
/// Copy of all the command-line flags passed at .swiftinterface

lib/AST/ASTContext.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3453,7 +3453,7 @@ CanSILFunctionType SILFunctionType::get(
34533453

34543454
// All SILFunctionTypes are canonical.
34553455

3456-
// See [SILFunctionType-layout]
3456+
// See [NOTE: SILFunctionType-layout]
34573457
bool hasResultCache = normalResults.size() > 1;
34583458
size_t bytes =
34593459
totalSizeToAlloc<SILParameterInfo, SILResultInfo, SILYieldInfo,

lib/AST/ASTDemangler.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -530,7 +530,7 @@ Type ASTBuilder::createImplFunctionType(
530530
break;
531531
}
532532

533-
// TODO: [store-sil-clang-function-type]
533+
// [TODO: Store-SIL-Clang-type]
534534
auto einfo = SILFunctionType::ExtInfo(representation, flags.isPseudogeneric(),
535535
!flags.isEscaping(), diffKind,
536536
/*clangFunctionType*/ nullptr);

lib/AST/ASTPrinter.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4019,8 +4019,7 @@ class TypePrinter : public TypeVisitor<TypePrinter> {
40194019
break;
40204020
case SILFunctionType::Representation::CFunctionPointer:
40214021
Printer << "c";
4022-
// FIXME: [clang-function-type-serialization] Once we start serializing
4023-
// Clang function types, we should be able to remove the second check.
4022+
// [TODO: Clang-type-plumbing] Remove the second check.
40244023
if (printNameOnly || !info.getUncommonInfo().hasValue())
40254024
break;
40264025
printCType(Ctx, Printer, info);
@@ -4086,8 +4085,7 @@ class TypePrinter : public TypeVisitor<TypePrinter> {
40864085
break;
40874086
case SILFunctionType::Representation::CFunctionPointer:
40884087
Printer << "c";
4089-
// FIXME: [clang-function-type-serialization] Once we start serializing
4090-
// Clang function types, we should be able to remove the second check.
4088+
// [TODO: Clang-type-plumbing] Remove the second check.
40914089
if (printNameOnly || !info.getUncommonInfo().hasValue())
40924090
break;
40934091
printCType(Ctx, Printer, info);

lib/AST/Type.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3407,7 +3407,7 @@ const clang::Type *AnyFunctionType::getCanonicalClangFunctionType() const {
34073407
return ty ? ty->getCanonicalTypeInternal().getTypePtr() : nullptr;
34083408
}
34093409

3410-
// TODO: [store-sil-clang-function-type]
3410+
// [TODO: Store-SIL-Clang-type]
34113411
const clang::FunctionType *SILFunctionType::getClangFunctionType() const {
34123412
return nullptr;
34133413
}

lib/ClangImporter/ClangImporter.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3409,7 +3409,7 @@ void ClangModuleUnit::getImportedModules(
34093409
if (filter.containsOnly(ModuleDecl::ImportFilterKind::ImplementationOnly))
34103410
return;
34113411

3412-
// [Note: Pure-Clang-modules-privately-import-stdlib]:
3412+
// [NOTE: Pure-Clang-modules-privately-import-stdlib]:
34133413
// Needed for implicitly synthesized conformances.
34143414
if (filter.contains(ModuleDecl::ImportFilterKind::Private))
34153415
if (auto stdlib = owner.getStdlibModule())

lib/Frontend/Frontend.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -428,10 +428,10 @@ void CompilerInstance::setUpDiagnosticOptions() {
428428
// this modules was specified as an explicit input to the compiler.
429429
// 4. ModuleInterfaceLoader: Tries to find an up-to-date swiftmodule. If it
430430
// succeeds, it issues a particular "error" (see
431-
// [Note: ModuleInterfaceLoader-defer-to-ImplicitSerializedModuleLoader]), which
432-
// is interpreted by the overarching loader as a command to use the
433-
// ImplicitSerializedModuleLoader. If we failed to find a .swiftmodule, this falls
434-
// back to using an interface. Actual errors lead to diagnostics.
431+
// [NOTE: ModuleInterfaceLoader-defer-to-ImplicitSerializedModuleLoader]),
432+
// which is interpreted by the overarching loader as a command to use the
433+
// ImplicitSerializedModuleLoader. If we failed to find a .swiftmodule,
434+
// this falls back to using an interface. Actual errors lead to diagnostics.
435435
// 5. ImplicitSerializedModuleLoader: Loads a serialized module if it can.
436436
// Used for implicit loading of modules from the compiler's search paths.
437437
// 6. ClangImporter: This must come after all the Swift module loaders because

0 commit comments

Comments
 (0)