Skip to content

Commit b31d6d9

Browse files
tbaederrlegrosbuffle
authored andcommitted
[clang][NFC] Preprocessor only needs const LangOptions (llvm#66874)
1 parent 50d23f4 commit b31d6d9

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

clang/include/clang/Lex/Preprocessor.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ class Preprocessor {
132132
llvm::unique_function<void(const clang::Token &)> OnToken;
133133
std::shared_ptr<PreprocessorOptions> PPOpts;
134134
DiagnosticsEngine *Diags;
135-
LangOptions &LangOpts;
135+
const LangOptions &LangOpts;
136136
const TargetInfo *Target = nullptr;
137137
const TargetInfo *AuxTarget = nullptr;
138138
FileManager &FileMgr;
@@ -1161,8 +1161,9 @@ class Preprocessor {
11611161

11621162
public:
11631163
Preprocessor(std::shared_ptr<PreprocessorOptions> PPOpts,
1164-
DiagnosticsEngine &diags, LangOptions &opts, SourceManager &SM,
1165-
HeaderSearch &Headers, ModuleLoader &TheModuleLoader,
1164+
DiagnosticsEngine &diags, const LangOptions &LangOpts,
1165+
SourceManager &SM, HeaderSearch &Headers,
1166+
ModuleLoader &TheModuleLoader,
11661167
IdentifierInfoLookup *IILookup = nullptr,
11671168
bool OwnsHeaderSearch = false,
11681169
TranslationUnitKind TUKind = TU_Complete);

clang/lib/Lex/Preprocessor.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ LLVM_INSTANTIATE_REGISTRY(PragmaHandlerRegistry)
7777
ExternalPreprocessorSource::~ExternalPreprocessorSource() = default;
7878

7979
Preprocessor::Preprocessor(std::shared_ptr<PreprocessorOptions> PPOpts,
80-
DiagnosticsEngine &diags, LangOptions &opts,
80+
DiagnosticsEngine &diags, const LangOptions &opts,
8181
SourceManager &SM, HeaderSearch &Headers,
8282
ModuleLoader &TheModuleLoader,
8383
IdentifierInfoLookup *IILookup, bool OwnsHeaders,

0 commit comments

Comments
 (0)