@@ -156,7 +156,6 @@ enum class DescriptiveDeclKind : uint8_t {
156156 Extension,
157157 EnumCase,
158158 TopLevelCode,
159- PoundDiagnostic,
160159 PatternBinding,
161160 Var,
162161 Param,
@@ -839,14 +838,6 @@ class alignas(1 << DeclAlignInBits) Decl : public ASTAllocated<Decl>, public Swi
839838 HasLazyConformances : 1
840839 );
841840
842- SWIFT_INLINE_BITFIELD (PoundDiagnosticDecl, Decl, 1 +1 ,
843- // / `true` if the diagnostic is an error, `false` if it's a warning.
844- IsError : 1 ,
845-
846- // / Whether this diagnostic has already been emitted.
847- HasBeenEmitted : 1
848- );
849-
850841 SWIFT_INLINE_BITFIELD (MissingMemberDecl, Decl, 1 +2 ,
851842 NumberOfFieldOffsetVectorEntries : 1 ,
852843 NumberOfVTableEntries : 2
@@ -2799,52 +2790,6 @@ class SerializedTopLevelCodeDeclContext : public DeclContext {
27992790 }
28002791};
28012792
2802- class StringLiteralExpr ;
2803-
2804- class PoundDiagnosticDecl : public Decl {
2805- SourceLoc StartLoc;
2806- SourceLoc EndLoc;
2807- StringLiteralExpr *Message;
2808- SourceLoc getLocFromSource () const { return StartLoc; }
2809- friend class Decl ;
2810- public:
2811- PoundDiagnosticDecl (DeclContext *Parent, bool IsError, SourceLoc StartLoc,
2812- SourceLoc EndLoc, StringLiteralExpr *Message)
2813- : Decl(DeclKind::PoundDiagnostic, Parent), StartLoc(StartLoc),
2814- EndLoc (EndLoc), Message(Message) {
2815- Bits.PoundDiagnosticDecl .IsError = IsError;
2816- Bits.PoundDiagnosticDecl .HasBeenEmitted = false ;
2817- }
2818-
2819- DiagnosticKind getKind () const {
2820- return isError () ? DiagnosticKind::Error : DiagnosticKind::Warning;
2821- }
2822-
2823- StringLiteralExpr *getMessage () const { return Message; }
2824-
2825- bool isError () const {
2826- return Bits.PoundDiagnosticDecl .IsError ;
2827- }
2828-
2829- bool hasBeenEmitted () const {
2830- return Bits.PoundDiagnosticDecl .HasBeenEmitted ;
2831- }
2832-
2833- void markEmitted () {
2834- Bits.PoundDiagnosticDecl .HasBeenEmitted = true ;
2835- }
2836-
2837- SourceLoc getEndLoc () const { return EndLoc; };
2838-
2839- SourceRange getSourceRange () const {
2840- return SourceRange (StartLoc, EndLoc);
2841- }
2842-
2843- static bool classof (const Decl *D) {
2844- return D->getKind () == DeclKind::PoundDiagnostic;
2845- }
2846- };
2847-
28482793class OpaqueTypeDecl ;
28492794
28502795// / ValueDecl - All named decls that are values in the language. These can
0 commit comments