SerializedDiagnostics.h 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. #pragma once
  2. #ifdef __GNUC__
  3. #pragma GCC diagnostic push
  4. #pragma GCC diagnostic ignored "-Wunused-parameter"
  5. #endif
  6. //===--- SerializedDiagnostics.h - Common data for serialized diagnostics -===//
  7. //
  8. // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
  9. // See https://llvm.org/LICENSE.txt for license information.
  10. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  11. //
  12. //===----------------------------------------------------------------------===//
  13. #ifndef LLVM_CLANG_FRONTEND_SERIALIZEDDIAGNOSTICS_H
  14. #define LLVM_CLANG_FRONTEND_SERIALIZEDDIAGNOSTICS_H
  15. #include "llvm/Bitstream/BitCodes.h"
  16. namespace clang {
  17. namespace serialized_diags {
  18. enum BlockIDs {
  19. /// 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. /// The this block acts as a container for all the information
  23. /// for a specific diagnostic.
  24. BLOCK_DIAG
  25. };
  26. enum RecordIDs {
  27. RECORD_VERSION = 1,
  28. RECORD_DIAG,
  29. RECORD_SOURCE_RANGE,
  30. RECORD_DIAG_FLAG,
  31. RECORD_CATEGORY,
  32. RECORD_FILENAME,
  33. RECORD_FIXIT,
  34. RECORD_FIRST = RECORD_VERSION,
  35. RECORD_LAST = RECORD_FIXIT
  36. };
  37. /// A stable version of DiagnosticIDs::Level.
  38. ///
  39. /// Do not change the order of values in this enum, and please increment the
  40. /// serialized diagnostics version number when you add to it.
  41. enum Level {
  42. Ignored = 0,
  43. Note,
  44. Warning,
  45. Error,
  46. Fatal,
  47. Remark
  48. };
  49. /// The serialized diagnostics version number.
  50. enum { VersionNumber = 2 };
  51. } // end serialized_diags namespace
  52. } // end clang namespace
  53. #endif
  54. #ifdef __GNUC__
  55. #pragma GCC diagnostic pop
  56. #endif