@@ -140,7 +140,7 @@ class Preprocessor {
140
140
friend class VariadicMacroScopeGuard ;
141
141
142
142
llvm::unique_function<void (const clang::Token &)> OnToken;
143
- std::shared_ptr<PreprocessorOptions> PPOpts;
143
+ std::shared_ptr<const PreprocessorOptions> PPOpts;
144
144
DiagnosticsEngine *Diags;
145
145
const LangOptions &LangOpts;
146
146
const TargetInfo *Target = nullptr ;
@@ -1165,7 +1165,7 @@ class Preprocessor {
1165
1165
void updateOutOfDateIdentifier (const IdentifierInfo &II) const ;
1166
1166
1167
1167
public:
1168
- Preprocessor (std::shared_ptr<PreprocessorOptions> PPOpts,
1168
+ Preprocessor (std::shared_ptr<const PreprocessorOptions> PPOpts,
1169
1169
DiagnosticsEngine &diags, const LangOptions &LangOpts,
1170
1170
SourceManager &SM, HeaderSearch &Headers,
1171
1171
ModuleLoader &TheModuleLoader,
@@ -1197,7 +1197,7 @@ class Preprocessor {
1197
1197
1198
1198
// / Retrieve the preprocessor options used to initialize this
1199
1199
// / preprocessor.
1200
- PreprocessorOptions &getPreprocessorOpts () const { return *PPOpts; }
1200
+ const PreprocessorOptions &getPreprocessorOpts () const { return *PPOpts; }
1201
1201
1202
1202
DiagnosticsEngine &getDiagnostics () const { return *Diags; }
1203
1203
void setDiagnostics (DiagnosticsEngine &D) { Diags = &D; }
0 commit comments