[cfe-commits] r143761 - in /cfe/trunk: include/clang/Frontend/SerializedDiagnosticPrinter.h lib/Frontend/SerializedDiagnosticPrinter.cpp

Ted Kremenek kremenek at apple.com
Fri Nov 4 17:09:57 PDT 2011


Author: kremenek
Date: Fri Nov  4 19:09:57 2011
New Revision: 143761

URL: http://llvm.org/viewvc/llvm-project?rev=143761&view=rev
Log:
Move definition of record/block IDs for serialized diagnostics to public header.

Modified:
    cfe/trunk/include/clang/Frontend/SerializedDiagnosticPrinter.h
    cfe/trunk/lib/Frontend/SerializedDiagnosticPrinter.cpp

Modified: cfe/trunk/include/clang/Frontend/SerializedDiagnosticPrinter.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Frontend/SerializedDiagnosticPrinter.h?rev=143761&r1=143760&r2=143761&view=diff
==============================================================================
--- cfe/trunk/include/clang/Frontend/SerializedDiagnosticPrinter.h (original)
+++ cfe/trunk/include/clang/Frontend/SerializedDiagnosticPrinter.h Fri Nov  4 19:09:57 2011
@@ -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 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.
 ///

Modified: cfe/trunk/lib/Frontend/SerializedDiagnosticPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/SerializedDiagnosticPrinter.cpp?rev=143761&r1=143760&r2=143761&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/SerializedDiagnosticPrinter.cpp (original)
+++ cfe/trunk/lib/Frontend/SerializedDiagnosticPrinter.cpp Fri Nov  4 19:09:57 2011
@@ -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 @@
   /// \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
 





More information about the cfe-commits mailing list