]> granicus.if.org Git - clang/commitdiff
Move definition of record/block IDs for serialized diagnostics to public header.
authorTed Kremenek <kremenek@apple.com>
Sat, 5 Nov 2011 00:09:57 +0000 (00:09 +0000)
committerTed Kremenek <kremenek@apple.com>
Sat, 5 Nov 2011 00:09:57 +0000 (00:09 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143761 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Frontend/SerializedDiagnosticPrinter.h
lib/Frontend/SerializedDiagnosticPrinter.cpp

index b092b86ee5c0a33cb2876445993ac53af05115b5..7338b7003f8293e73d81038967d4a07a4c5626f8 100644 (file)
@@ -10,6 +10,8 @@
 #ifndef LLVM_CLANG_FRONTEND_SERIALIZE_DIAGNOSTIC_PRINTER_H_
 #define LLVM_CLANG_FRONTEND_SERIALIZE_DIAGNOSTIC_PRINTER_H_
 
+#include "llvm/Bitcode/BitstreamWriter.h"
+
 namespace llvm {
 class raw_ostream;
 }
@@ -19,6 +21,22 @@ class DiagnosticConsumer;
 class DiagnosticsEngine;
 
 namespace serialized_diags {
+  
+enum BlockIDs {
+  /// \brief The DIAG block, which acts as a container around a diagnostic.
+  BLOCK_DIAG = llvm::bitc::FIRST_APPLICATION_BLOCKID,
+  /// \brief The STRINGS block, which contains strings 
+  /// from multiple diagnostics.
+  BLOCK_STRINGS
+};
+
+enum RecordIDs {
+  RECORD_DIAG = 1,
+  RECORD_DIAG_FLAG,
+  RECORD_CATEGORY,
+  RECORD_FILENAME
+};
+
 /// \brief Returns a DiagnosticConsumer that serializes diagnostics to
 ///  a bitcode file.
 ///
index 3516ad2e7bec732764b6083ab969149de0574e46..3f42c5fe74d67d70bf471f40adbbfa6b4962f636 100644 (file)
@@ -8,7 +8,6 @@
 //===----------------------------------------------------------------------===//
 
 #include <vector>
-#include "llvm/Bitcode/BitstreamWriter.h"
 #include "llvm/Support/raw_ostream.h"
 #include "llvm/ADT/StringRef.h"
 #include "llvm/ADT/SmallString.h"
@@ -20,6 +19,7 @@
 #include "clang/Frontend/SerializedDiagnosticPrinter.h"
 
 using namespace clang;
+using namespace clang::serialized_diags;
 
 namespace {
 
@@ -130,21 +130,6 @@ private:
   /// \brief Flag indicating whether or not we are in the process of
   /// emitting a non-note diagnostic.
   bool inNonNoteDiagnostic;
-
-  enum BlockIDs {
-    /// \brief The DIAG block, which acts as a container around a diagnostic.
-    BLOCK_DIAG = llvm::bitc::FIRST_APPLICATION_BLOCKID,
-    /// \brief The STRINGS block, which contains strings 
-    /// from multiple diagnostics.
-    BLOCK_STRINGS
-  };
-  
-  enum RecordIDs {
-    RECORD_DIAG = 1,
-    RECORD_DIAG_FLAG,
-    RECORD_CATEGORY,
-    RECORD_FILENAME
-  };
 };
 } // end anonymous namespace