Skip to content

Commit fadc7e7

Browse files
[docs] Add comments clarifying roles of Type.h and Types.h.
1 parent 3cb8f9b commit fadc7e7

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

include/swift/AST/Type.h

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//===--- Type.h - Swift Language Type ASTs ----------------------*- C++ -*-===//
1+
//===--- Type.h - Value objects for Swift and SIL types ---------*- C++ -*-===//
22
//
33
// This source file is part of the Swift.org open source project
44
//
@@ -10,7 +10,10 @@
1010
//
1111
//===----------------------------------------------------------------------===//
1212
//
13-
// This file defines the Type class.
13+
// This file defines the Type and CanType classes, which are value objects
14+
// used to cheaply pass around different kinds of types. The full hierarchy for
15+
// Swift and SIL types -- including tuple types, function types and more -- is
16+
// defined in Types.h.
1417
//
1518
//===----------------------------------------------------------------------===//
1619

include/swift/AST/Types.h

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010
//
1111
//===----------------------------------------------------------------------===//
1212
//
13-
// This file defines the TypeBase class and subclasses.
13+
// This file defines the TypeBase class and subclasses, which describe the Swift
14+
// and SIL ASTs. See also: Type.h.
1415
//
1516
//===----------------------------------------------------------------------===//
1617

@@ -282,7 +283,9 @@ enum class TypeMatchFlags {
282283
};
283284
using TypeMatchOptions = OptionSet<TypeMatchFlags>;
284285

285-
/// TypeBase - Base class for all types in Swift.
286+
/// Base class for all types which describe the Swift and SIL ASTs.
287+
///
288+
/// See TypeNodes.def for a succinct description of the full class hierarchy.
286289
class alignas(1 << TypeAlignInBits) TypeBase {
287290

288291
friend class ASTContext;

0 commit comments

Comments
 (0)