@@ -151,7 +151,6 @@ enum class DescriptiveDeclKind : uint8_t {
151
151
Extension,
152
152
EnumCase,
153
153
TopLevelCode,
154
- IfConfig,
155
154
PoundDiagnostic,
156
155
PatternBinding,
157
156
Var,
@@ -819,11 +818,6 @@ class alignas(1 << DeclAlignInBits) Decl : public ASTAllocated<Decl> {
819
818
HasLazyConformances : 1
820
819
);
821
820
822
- SWIFT_INLINE_BITFIELD (IfConfigDecl, Decl, 1 ,
823
- // / Whether this decl is missing its closing '#endif'.
824
- HadMissingEnd : 1
825
- );
826
-
827
821
SWIFT_INLINE_BITFIELD (PoundDiagnosticDecl, Decl, 1 +1 ,
828
822
// / `true` if the diagnostic is an error, `false` if it's a warning.
829
823
IsError : 1 ,
@@ -2658,51 +2652,6 @@ class SerializedTopLevelCodeDeclContext : public DeclContext {
2658
2652
}
2659
2653
};
2660
2654
2661
- // / IfConfigDecl - This class represents #if/#else/#endif blocks.
2662
- // / Active and inactive block members are stored separately, with the intention
2663
- // / being that active members will be handed back to the enclosing context.
2664
- class IfConfigDecl : public Decl {
2665
- // / An array of clauses controlling each of the #if/#elseif/#else conditions.
2666
- // / The array is ASTContext allocated.
2667
- ArrayRef<IfConfigClause> Clauses;
2668
- SourceLoc EndLoc;
2669
- SourceLoc getLocFromSource () const { return Clauses[0 ].Loc ; }
2670
- friend class Decl ;
2671
- public:
2672
-
2673
- IfConfigDecl (DeclContext *Parent, ArrayRef<IfConfigClause> Clauses,
2674
- SourceLoc EndLoc, bool HadMissingEnd)
2675
- : Decl(DeclKind::IfConfig, Parent), Clauses(Clauses), EndLoc(EndLoc)
2676
- {
2677
- Bits.IfConfigDecl .HadMissingEnd = HadMissingEnd;
2678
- }
2679
-
2680
- ArrayRef<IfConfigClause> getClauses () const { return Clauses; }
2681
-
2682
- // / Return the active clause, or null if there is no active one.
2683
- const IfConfigClause *getActiveClause () const {
2684
- for (auto &Clause : Clauses)
2685
- if (Clause.isActive ) return &Clause;
2686
- return nullptr ;
2687
- }
2688
-
2689
- const ArrayRef<ASTNode> getActiveClauseElements () const {
2690
- if (auto *Clause = getActiveClause ())
2691
- return Clause->Elements ;
2692
- return {};
2693
- }
2694
-
2695
- SourceLoc getEndLoc () const { return EndLoc; }
2696
-
2697
- bool hadMissingEnd () const { return Bits.IfConfigDecl .HadMissingEnd ; }
2698
-
2699
- SourceRange getSourceRange () const ;
2700
-
2701
- static bool classof (const Decl *D) {
2702
- return D->getKind () == DeclKind::IfConfig;
2703
- }
2704
- };
2705
-
2706
2655
class StringLiteralExpr ;
2707
2656
2708
2657
class PoundDiagnosticDecl : public Decl {
0 commit comments