diff options
author | Jan Svoboda <jan_svoboda@apple.com> | 2025-03-21 13:52:12 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-03-21 13:52:12 -0700 |
commit | 7606f6773cb5abe701b615b0bec54e68758955d7 (patch) | |
tree | a014df9051c20296753b4681aba82772dd918a06 /clang/lib/Frontend/CompilerInvocation.cpp | |
parent | 900be712ce4fe56e2165bfe4e9213b555bfe3887 (diff) | |
download | llvm-7606f6773cb5abe701b615b0bec54e68758955d7.zip llvm-7606f6773cb5abe701b615b0bec54e68758955d7.tar.gz llvm-7606f6773cb5abe701b615b0bec54e68758955d7.tar.bz2 |
[clang] NFCI: Mutate `HeaderSearchOptions` earlier (#130823)
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
-rw-r--r-- | clang/lib/Frontend/CompilerInvocation.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp index b2d8d12..756ae10 100644 --- a/clang/lib/Frontend/CompilerInvocation.cpp +++ b/clang/lib/Frontend/CompilerInvocation.cpp @@ -4971,6 +4971,14 @@ bool CompilerInvocation::CreateFromArgsImpl( llvm::Triple T(Res.getTargetOpts().Triple); ParseHeaderSearchArgs(Res.getHeaderSearchOpts(), Args, Diags, Res.getFileSystemOpts().WorkingDir); + if (Res.getFrontendOpts().GenReducedBMI || + Res.getFrontendOpts().ProgramAction == + frontend::GenerateReducedModuleInterface || + Res.getFrontendOpts().ProgramAction == + frontend::GenerateModuleInterface) { + Res.getHeaderSearchOpts().ModulesSkipDiagnosticOptions = true; + Res.getHeaderSearchOpts().ModulesSkipHeaderSearchPaths = true; + } ParseAPINotesArgs(Res.getAPINotesOpts(), Args, Diags); ParsePointerAuthArgs(LangOpts, Args, Diags); |