class PCHValidator

Declaration

class PCHValidator : public ASTReaderListener { /* full declaration omitted */ };

Description

ASTReaderListener implementation to validate the information of the PCH file against an initialized Preprocessor.

Declared at: clang/include/clang/Serialization/ASTReader.h:275

Inherits from: ASTReaderListener

Member Variables

private clang::Preprocessor& PP
private clang::ASTReader& Reader

Method Overview

  • private void Error(const char * Msg)
  • public PCHValidator(clang::Preprocessor & PP, clang::ASTReader & Reader)
  • public void ReadCounter(const serialization::ModuleFile & M, unsigned int Value)
  • public bool ReadDiagnosticOptions(IntrusiveRefCntPtr<clang::DiagnosticOptions> DiagOpts, bool Complain)
  • public bool ReadHeaderSearchOptions(const clang::HeaderSearchOptions & HSOpts, llvm::StringRef SpecificModuleCachePath, bool Complain)
  • public bool ReadLanguageOptions(const clang::LangOptions & LangOpts, bool Complain, bool AllowCompatibleDifferences)
  • public bool ReadPreprocessorOptions(const clang::PreprocessorOptions & PPOpts, bool Complain, std::string & SuggestedPredefines)
  • public bool ReadTargetOptions(const clang::TargetOptions & TargetOpts, bool Complain, bool AllowCompatibleDifferences)

Inherited from ASTReaderListener:

Methods

void Error(const char* Msg)

Declared at: clang/include/clang/Serialization/ASTReader.h:297

Parameters

const char* Msg

PCHValidator(clang::Preprocessor& PP,
             clang::ASTReader& Reader)

Declared at: clang/include/clang/Serialization/ASTReader.h:280

Parameters

clang::Preprocessor& PP
clang::ASTReader& Reader

void ReadCounter(
    const serialization::ModuleFile& M,
    unsigned int Value)

Description

Receives __COUNTER__ value.

Declared at: clang/include/clang/Serialization/ASTReader.h:294

Parameters

const serialization::ModuleFile& M
unsigned int Value

bool ReadDiagnosticOptions(
    IntrusiveRefCntPtr<clang::DiagnosticOptions>
        DiagOpts,
    bool Complain)

Description

Receives the diagnostic options.

Declared at: clang/include/clang/Serialization/ASTReader.h:287

Parameters

IntrusiveRefCntPtr<clang::DiagnosticOptions> DiagOpts
bool Complain

Returns

true to indicate the diagnostic options are invalid, or false otherwise.

bool ReadHeaderSearchOptions(
    const clang::HeaderSearchOptions& HSOpts,
    llvm::StringRef SpecificModuleCachePath,
    bool Complain)

Description

Receives the header search options.

Declared at: clang/include/clang/Serialization/ASTReader.h:291

Parameters

const clang::HeaderSearchOptions& HSOpts
llvm::StringRef SpecificModuleCachePath
bool Complain

Returns

true to indicate the header search options are invalid, or false otherwise.

bool ReadLanguageOptions(
    const clang::LangOptions& LangOpts,
    bool Complain,
    bool AllowCompatibleDifferences)

Description

Receives the language options.

Declared at: clang/include/clang/Serialization/ASTReader.h:283

Parameters

const clang::LangOptions& LangOpts
bool Complain
bool AllowCompatibleDifferences

Returns

true to indicate the options are invalid or false otherwise.

bool ReadPreprocessorOptions(
    const clang::PreprocessorOptions& PPOpts,
    bool Complain,
    std::string& SuggestedPredefines)

Description

Receives the preprocessor options.

Declared at: clang/include/clang/Serialization/ASTReader.h:289

Parameters

const clang::PreprocessorOptions& PPOpts
bool Complain
std::string& SuggestedPredefines
Can be filled in with the set of predefines that are suggested by the preprocessor options. Typically only used when loading a precompiled header.

Returns

true to indicate the preprocessor options are invalid, or false otherwise.

bool ReadTargetOptions(
    const clang::TargetOptions& TargetOpts,
    bool Complain,
    bool AllowCompatibleDifferences)

Description

Receives the target options.

Declared at: clang/include/clang/Serialization/ASTReader.h:285

Parameters

const clang::TargetOptions& TargetOpts
bool Complain
bool AllowCompatibleDifferences

Returns

true to indicate the target options are invalid, or false otherwise.