Skip to content

Commit c4ad840

Browse files
[NFC] Reuse SILExtInfoBuilder's main constructor in default constructor.
1 parent f86aad9 commit c4ad840

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

include/swift/AST/ExtInfo.h

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -516,7 +516,7 @@ class SILExtInfoBuilder {
516516

517517
public:
518518
// Constructor with all defaults.
519-
SILExtInfoBuilder() : bits(0), clangTypeInfo(ClangTypeInfo(nullptr)) {}
519+
SILExtInfoBuilder() : SILExtInfoBuilder(0, ClangTypeInfo(nullptr)) {}
520520

521521
// Constructor for polymorphic type.
522522
SILExtInfoBuilder(Representation rep, bool isPseudogeneric, bool isNoEscape,
@@ -526,6 +526,12 @@ class SILExtInfoBuilder {
526526
diffKind),
527527
ClangTypeInfo(type)) {}
528528

529+
SILExtInfoBuilder(ASTExtInfoBuilder info, bool isPseudogeneric)
530+
: SILExtInfoBuilder(makeBits(info.getSILRepresentation(), isPseudogeneric,
531+
info.isNoEscape(), info.isAsync(),
532+
info.getDifferentiabilityKind()),
533+
info.getClangTypeInfo()) {}
534+
529535
void checkInvariants() const;
530536

531537
/// Check if \c this is well-formed and create an ExtInfo.

0 commit comments

Comments
 (0)