@@ -360,12 +360,16 @@ class ASTExtInfo {
360360
361361 ASTExtInfoBuilder builder;
362362
363+ // Only for use by ASTExtInfoBuilder::build. Don't use it elsewhere!
363364 ASTExtInfo (ASTExtInfoBuilder builder) : builder(builder) {}
365+
364366 ASTExtInfo (unsigned bits, ClangTypeInfo clangTypeInfo)
365- : builder(bits, clangTypeInfo){};
367+ : builder(bits, clangTypeInfo) {
368+ builder.checkInvariants ();
369+ };
366370
367371public:
368- ASTExtInfo () : builder(){ };
372+ ASTExtInfo () : builder() { builder. checkInvariants (); };
369373
370374 // / Create a builder with the same state as \c this.
371375 ASTExtInfoBuilder intoBuilder () const { return builder; }
@@ -654,12 +658,16 @@ class SILExtInfo {
654658
655659 SILExtInfoBuilder builder;
656660
661+ // Only for use by SILExtInfoBuilder::build. Don't use it elsewhere!
657662 SILExtInfo (SILExtInfoBuilder builder) : builder(builder) {}
663+
658664 SILExtInfo (unsigned bits, ClangTypeInfo clangTypeInfo)
659- : builder(bits, clangTypeInfo){};
665+ : builder(bits, clangTypeInfo) {
666+ builder.checkInvariants ();
667+ };
660668
661669public:
662- SILExtInfo () : builder(){ };
670+ SILExtInfo () : builder() { builder. checkInvariants (); };
663671
664672 static SILExtInfo getThin () {
665673 return SILExtInfoBuilder (SILExtInfoBuilder::Representation::Thin, false ,
0 commit comments