Home | History | Annotate | Line # | Download | only in Frontend
      1 //===--- SerializedDiagnostics.h - Common data for serialized diagnostics -===//
      2 //
      3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
      4 // See https://llvm.org/LICENSE.txt for license information.
      5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
      6 //
      7 //===----------------------------------------------------------------------===//
      8 
      9 #ifndef LLVM_CLANG_FRONTEND_SERIALIZE_DIAGNOSTICS_H_
     10 #define LLVM_CLANG_FRONTEND_SERIALIZE_DIAGNOSTICS_H_
     11 
     12 #include "llvm/Bitstream/BitCodes.h"
     13 
     14 namespace clang {
     15 namespace serialized_diags {
     16 
     17 enum BlockIDs {
     18   /// A top-level block which represents any meta data associated
     19   /// with the diagostics, including versioning of the format.
     20   BLOCK_META = llvm::bitc::FIRST_APPLICATION_BLOCKID,
     21 
     22   /// The this block acts as a container for all the information
     23   /// for a specific diagnostic.
     24   BLOCK_DIAG
     25 };
     26 
     27 enum RecordIDs {
     28   RECORD_VERSION = 1,
     29   RECORD_DIAG,
     30   RECORD_SOURCE_RANGE,
     31   RECORD_DIAG_FLAG,
     32   RECORD_CATEGORY,
     33   RECORD_FILENAME,
     34   RECORD_FIXIT,
     35   RECORD_FIRST = RECORD_VERSION,
     36   RECORD_LAST = RECORD_FIXIT
     37 };
     38 
     39 /// A stable version of DiagnosticIDs::Level.
     40 ///
     41 /// Do not change the order of values in this enum, and please increment the
     42 /// serialized diagnostics version number when you add to it.
     43 enum Level {
     44   Ignored = 0,
     45   Note,
     46   Warning,
     47   Error,
     48   Fatal,
     49   Remark
     50 };
     51 
     52 /// The serialized diagnostics version number.
     53 enum { VersionNumber = 2 };
     54 
     55 } // end serialized_diags namespace
     56 } // end clang namespace
     57 
     58 #endif
     59