Author: Timm Baeder Date: 2023-09-27T06:36:18+02:00 New Revision: 17a1cc69a575a40428491b1c454d88c49ac07569
URL: https://github.com/llvm/llvm-project/commit/17a1cc69a575a40428491b1c454d88c49ac07569 DIFF: https://github.com/llvm/llvm-project/commit/17a1cc69a575a40428491b1c454d88c49ac07569.diff LOG: [clang][NFC] Preprocessor only needs const LangOptions (#66874) Added: Modified: clang/include/clang/Lex/Preprocessor.h clang/lib/Lex/Preprocessor.cpp Removed: ################################################################################ diff --git a/clang/include/clang/Lex/Preprocessor.h b/clang/include/clang/Lex/Preprocessor.h index 575d08b83fd3a02..2b10ea91bde7794 100644 --- a/clang/include/clang/Lex/Preprocessor.h +++ b/clang/include/clang/Lex/Preprocessor.h @@ -132,7 +132,7 @@ class Preprocessor { llvm::unique_function<void(const clang::Token &)> OnToken; std::shared_ptr<PreprocessorOptions> PPOpts; DiagnosticsEngine *Diags; - LangOptions &LangOpts; + const LangOptions &LangOpts; const TargetInfo *Target = nullptr; const TargetInfo *AuxTarget = nullptr; FileManager &FileMgr; @@ -1161,8 +1161,9 @@ class Preprocessor { public: Preprocessor(std::shared_ptr<PreprocessorOptions> PPOpts, - DiagnosticsEngine &diags, LangOptions &opts, SourceManager &SM, - HeaderSearch &Headers, ModuleLoader &TheModuleLoader, + DiagnosticsEngine &diags, const LangOptions &LangOpts, + SourceManager &SM, HeaderSearch &Headers, + ModuleLoader &TheModuleLoader, IdentifierInfoLookup *IILookup = nullptr, bool OwnsHeaderSearch = false, TranslationUnitKind TUKind = TU_Complete); diff --git a/clang/lib/Lex/Preprocessor.cpp b/clang/lib/Lex/Preprocessor.cpp index f0381c18a8b6f77..6dfe7c0ccc50b33 100644 --- a/clang/lib/Lex/Preprocessor.cpp +++ b/clang/lib/Lex/Preprocessor.cpp @@ -77,7 +77,7 @@ LLVM_INSTANTIATE_REGISTRY(PragmaHandlerRegistry) ExternalPreprocessorSource::~ExternalPreprocessorSource() = default; Preprocessor::Preprocessor(std::shared_ptr<PreprocessorOptions> PPOpts, - DiagnosticsEngine &diags, LangOptions &opts, + DiagnosticsEngine &diags, const LangOptions &opts, SourceManager &SM, HeaderSearch &Headers, ModuleLoader &TheModuleLoader, IdentifierInfoLookup *IILookup, bool OwnsHeaders, _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits