@@ -140,7 +140,7 @@ class Preprocessor {
140140 friend class VariadicMacroScopeGuard ;
141141
142142 llvm::unique_function<void (const clang::Token &)> OnToken;
143- std::shared_ptr<PreprocessorOptions> PPOpts;
143+ std::shared_ptr<const PreprocessorOptions> PPOpts;
144144 DiagnosticsEngine *Diags;
145145 const LangOptions &LangOpts;
146146 const TargetInfo *Target = nullptr ;
@@ -1165,7 +1165,7 @@ class Preprocessor {
11651165 void updateOutOfDateIdentifier (const IdentifierInfo &II) const ;
11661166
11671167public:
1168- Preprocessor (std::shared_ptr<PreprocessorOptions> PPOpts,
1168+ Preprocessor (std::shared_ptr<const PreprocessorOptions> PPOpts,
11691169 DiagnosticsEngine &diags, const LangOptions &LangOpts,
11701170 SourceManager &SM, HeaderSearch &Headers,
11711171 ModuleLoader &TheModuleLoader,
@@ -1197,7 +1197,7 @@ class Preprocessor {
11971197
11981198 // / Retrieve the preprocessor options used to initialize this
11991199 // / preprocessor.
1200- PreprocessorOptions &getPreprocessorOpts () const { return *PPOpts; }
1200+ const PreprocessorOptions &getPreprocessorOpts () const { return *PPOpts; }
12011201
12021202 DiagnosticsEngine &getDiagnostics () const { return *Diags; }
12031203 void setDiagnostics (DiagnosticsEngine &D) { Diags = &D; }
0 commit comments