Skip to content

Commit 1ddf4ff

Browse files
[Gardening] Use consistent style for referencing notes.
1 parent a174e57 commit 1ddf4ff

File tree

9 files changed

+19
-19
lines changed

9 files changed

+19
-19
lines changed

include/swift/AST/Types.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4371,7 +4371,7 @@ class SILFunctionType final : public TypeBase, public llvm::FoldingSetNode,
43714371
unsigned NumAnyResults : 16; // Not including the ErrorResult.
43724372
unsigned NumAnyIndirectFormalResults : 16; // Subset of NumAnyResults.
43734373

4374-
// [SILFunctionType-layout]
4374+
// [NOTE: SILFunctionType-layout]
43754375
// The layout of a SILFunctionType in memory is:
43764376
// SILFunctionType
43774377
// SILParameterInfo[NumParameters]

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/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

lib/Frontend/ModuleInterfaceLoader.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -613,7 +613,7 @@ class ModuleInterfaceLoaderImpl {
613613
case ModuleLoadingMode::OnlySerialized:
614614
llvm_unreachable("module interface loader should not have been created");
615615
}
616-
// [Note: ModuleInterfaceLoader-defer-to-SerializedModuleLoader]
616+
// [NOTE: ModuleInterfaceLoader-defer-to-ImplicitSerializedModuleLoader]
617617
// If there's a module adjacent to the .swiftinterface that we can
618618
// _likely_ load (it validates OK and is up to date), bail early with
619619
// errc::not_supported, so the next (serialized) loader in the chain will

lib/FrontendTool/FrontendTool.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@ class ABIDependencyEvaluator {
367367
};
368368
} // end anonymous namespace
369369

370-
// See [Note: Bailing-vs-crashing-in-trace-emission].
370+
// See [NOTE: Bailing-vs-crashing-in-trace-emission].
371371
// TODO: Use PrettyStackTrace instead?
372372
void ABIDependencyEvaluator::crashOnInvariantViolation(
373373
llvm::function_ref<void (llvm::raw_string_ostream &)> f) const {
@@ -380,7 +380,7 @@ void ABIDependencyEvaluator::crashOnInvariantViolation(
380380
#endif
381381
}
382382

383-
// [Note: Trace-Clang-submodule-complexity]
383+
// [NOTE: Trace-Clang-submodule-complexity]
384384
//
385385
// A Clang module may have zero or more submodules. In practice, when traversing
386386
// the imports of a module, we observe that different submodules of the same
@@ -393,7 +393,7 @@ void ABIDependencyEvaluator::crashOnInvariantViolation(
393393
// branches, so long as we don't try to visit an ancestor when one of its
394394
// descendants is still on the traversal stack, so that we don't end up with
395395
// arbitrarily complex intra-module cycles.
396-
// See also: [Note: Intra-module-leafwards-traversal].
396+
// See also: [NOTE: Intra-module-leafwards-traversal].
397397
// 2. When adding entries to the ABI export map, we need to avoid marking
398398
// dependencies within the same top-level module. This step is needed in
399399
// addition to step 1 to avoid creating cycles like
@@ -421,7 +421,7 @@ void ABIDependencyEvaluator::reexposeImportedABI(
421421
&& module->isNonSwiftModule()
422422
&& module->getTopLevelModule() == reexport->getTopLevelModule()) {
423423
// Dependencies within the same top-level Clang module are not useful.
424-
// See also: [Note: Trace-Clang-submodule-complexity].
424+
// See also: [NOTE: Trace-Clang-submodule-complexity].
425425
return;
426426
}
427427

@@ -504,18 +504,18 @@ void ABIDependencyEvaluator::computeABIDependenciesForClangModule(
504504
// There are three cases here which can potentially create cycles:
505505
//
506506
// 1. Clang modules importing the stdlib.
507-
// See [Note: Pure-Clang-modules-privately-import-stdlib].
507+
// See [NOTE: Pure-Clang-modules-privately-import-stdlib].
508508
// 2. Overlay S @_exported-imports underlying module S' and another Clang
509509
// module C'. C' (transitively) #imports S' but it gets treated as if
510510
// C' imports S. This creates a cycle: S -> C' -> ... -> S.
511511
// In practice, this case is hit for
512512
// Darwin (Swift) -> SwiftOverlayShims (Clang) -> Darwin (Swift).
513-
// 3. [Note: Intra-module-leafwards-traversal]
513+
// 3. [NOTE: Intra-module-leafwards-traversal]
514514
// Cycles within the same top-level module.
515515
// These don't matter for us, since we only care about the dependency
516516
// graph at the granularity of top-level modules. So we ignore these
517517
// by only considering parent -> submodule dependencies.
518-
// See also [Note: Trace-Clang-submodule-complexity].
518+
// See also [NOTE: Trace-Clang-submodule-complexity].
519519
if (import->isStdlibModule()) {
520520
continue;
521521
}
@@ -720,7 +720,7 @@ static void computeSwiftModuleTraceInfo(
720720
});
721721
}
722722

723-
// [Note: Bailing-vs-crashing-in-trace-emission] There are certain edge cases
723+
// [NOTE: Bailing-vs-crashing-in-trace-emission] There are certain edge cases
724724
// in trace emission where an invariant that you think should hold does not hold
725725
// in practice. For example, sometimes we have seen modules without any
726726
// corresponding filename.

lib/Sema/TypeCheckType.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2213,7 +2213,7 @@ Type TypeResolver::resolveAttributedType(TypeAttributes &attrs,
22132213
}
22142214

22152215
// Resolve the function type directly with these attributes.
2216-
// TODO: [store-sil-clang-function-type]
2216+
// [TODO: Store-SIL-Clang-type]
22172217
SILFunctionType::ExtInfo extInfo(rep, attrs.has(TAK_pseudogeneric),
22182218
attrs.has(TAK_noescape), diffKind,
22192219
nullptr);

0 commit comments

Comments
 (0)