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