mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-18 07:16:40 +00:00
[clang] Make PreprocessorOptions
reference const
This commit is contained in:
parent
115a77df9d
commit
277ab85d1c
@ -140,7 +140,7 @@ class Preprocessor {
|
||||
friend class VariadicMacroScopeGuard;
|
||||
|
||||
llvm::unique_function<void(const clang::Token &)> OnToken;
|
||||
std::shared_ptr<PreprocessorOptions> PPOpts;
|
||||
std::shared_ptr<const PreprocessorOptions> PPOpts;
|
||||
DiagnosticsEngine *Diags;
|
||||
const LangOptions &LangOpts;
|
||||
const TargetInfo *Target = nullptr;
|
||||
@ -1165,7 +1165,7 @@ private:
|
||||
void updateOutOfDateIdentifier(const IdentifierInfo &II) const;
|
||||
|
||||
public:
|
||||
Preprocessor(std::shared_ptr<PreprocessorOptions> PPOpts,
|
||||
Preprocessor(std::shared_ptr<const PreprocessorOptions> PPOpts,
|
||||
DiagnosticsEngine &diags, const LangOptions &LangOpts,
|
||||
SourceManager &SM, HeaderSearch &Headers,
|
||||
ModuleLoader &TheModuleLoader,
|
||||
@ -1197,7 +1197,7 @@ public:
|
||||
|
||||
/// Retrieve the preprocessor options used to initialize this
|
||||
/// preprocessor.
|
||||
PreprocessorOptions &getPreprocessorOpts() const { return *PPOpts; }
|
||||
const PreprocessorOptions &getPreprocessorOpts() const { return *PPOpts; }
|
||||
|
||||
DiagnosticsEngine &getDiagnostics() const { return *Diags; }
|
||||
void setDiagnostics(DiagnosticsEngine &D) { Diags = &D; }
|
||||
|
@ -77,7 +77,7 @@ LLVM_INSTANTIATE_REGISTRY(PragmaHandlerRegistry)
|
||||
|
||||
ExternalPreprocessorSource::~ExternalPreprocessorSource() = default;
|
||||
|
||||
Preprocessor::Preprocessor(std::shared_ptr<PreprocessorOptions> PPOpts,
|
||||
Preprocessor::Preprocessor(std::shared_ptr<const PreprocessorOptions> PPOpts,
|
||||
DiagnosticsEngine &diags, const LangOptions &opts,
|
||||
SourceManager &SM, HeaderSearch &Headers,
|
||||
ModuleLoader &TheModuleLoader,
|
||||
|
Loading…
x
Reference in New Issue
Block a user