aboutsummaryrefslogtreecommitdiff
path: root/include/clang/Serialization
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2012-10-24 15:17:15 +0000
committerDouglas Gregor <dgregor@apple.com>2012-10-24 15:17:15 +0000
commit5f3d8224af99ad0d9107601c0c31b74693371cc1 (patch)
treeccb78103e62bda6da4e2fbce57145eb303f4f068 /include/clang/Serialization
parent6e347bccd1f132a41f9b72adbd25dc6be1dabe90 (diff)
Serialize DiagnosticOptions to the AST file.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166572 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Serialization')
-rw-r--r--include/clang/Serialization/ASTBitCodes.h5
-rw-r--r--include/clang/Serialization/ASTReader.h12
2 files changed, 16 insertions, 1 deletions
diff --git a/include/clang/Serialization/ASTBitCodes.h b/include/clang/Serialization/ASTBitCodes.h
index 1cf118638c..6e3bd149de 100644
--- a/include/clang/Serialization/ASTBitCodes.h
+++ b/include/clang/Serialization/ASTBitCodes.h
@@ -261,7 +261,10 @@ namespace clang {
/// \brief Offsets into the input-files block where input files
/// reside.
- INPUT_FILE_OFFSETS = 7
+ INPUT_FILE_OFFSETS = 7,
+
+ /// \brief Record code for the diagnostic options table.
+ DIAGNOSTIC_OPTIONS = 8
};
/// \brief Record types that occur within the input-files block
diff --git a/include/clang/Serialization/ASTReader.h b/include/clang/Serialization/ASTReader.h
index e9920efaa8..ffebcb9712 100644
--- a/include/clang/Serialization/ASTReader.h
+++ b/include/clang/Serialization/ASTReader.h
@@ -63,6 +63,7 @@ class ASTUnit; // FIXME: Layering violation and egregious hack.
class Attr;
class Decl;
class DeclContext;
+class DiagnosticOptions;
class NestedNameSpecifier;
class CXXBaseSpecifier;
class CXXConstructorDecl;
@@ -120,6 +121,15 @@ public:
return false;
}
+ /// \brief Receives the diagnostic options.
+ ///
+ /// \returns true to indicate the diagnostic options are invalid, or false
+ /// otherwise.
+ virtual bool ReadDiagnosticOptions(const DiagnosticOptions &DiagOpts,
+ bool Complain) {
+ return false;
+ }
+
/// \brief Receives the contents of the predefines buffer.
///
/// \param Buffers Information about the predefines buffers.
@@ -913,6 +923,8 @@ private:
ASTReaderListener &Listener);
static bool ParseTargetOptions(const RecordData &Record, bool Complain,
ASTReaderListener &Listener);
+ static bool ParseDiagnosticOptions(const RecordData &Record, bool Complain,
+ ASTReaderListener &Listener);
struct RecordLocation {
RecordLocation(ModuleFile *M, uint64_t O)