mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-18 12:46:51 +00:00
[clang] NFCI: Mutate HeaderSearchOptions
earlier (#130823)
This commit is contained in:
parent
900be712ce
commit
7606f6773c
@ -235,6 +235,7 @@ public:
|
||||
|
||||
/// Whether to entirely skip writing diagnostic options.
|
||||
/// Primarily used to speed up deserialization during dependency scanning.
|
||||
/// FIXME: Consider moving these into separate `SerializationOptions` class.
|
||||
LLVM_PREFERRED_TYPE(bool)
|
||||
unsigned ModulesSkipDiagnosticOptions : 1;
|
||||
|
||||
|
@ -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);
|
||||
|
@ -120,13 +120,6 @@ Module *CXX20ModulesGenerator::getEmittingModule(ASTContext &Ctx) {
|
||||
}
|
||||
|
||||
void CXX20ModulesGenerator::HandleTranslationUnit(ASTContext &Ctx) {
|
||||
// FIMXE: We'd better to wrap such options to a new class ASTWriterOptions
|
||||
// since this is not about searching header really.
|
||||
HeaderSearchOptions &HSOpts =
|
||||
getPreprocessor().getHeaderSearchInfo().getHeaderSearchOpts();
|
||||
HSOpts.ModulesSkipDiagnosticOptions = true;
|
||||
HSOpts.ModulesSkipHeaderSearchPaths = true;
|
||||
|
||||
PCHGenerator::HandleTranslationUnit(Ctx);
|
||||
|
||||
if (!isComplete())
|
||||
|
Loading…
x
Reference in New Issue
Block a user