aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/FrontendAction.cpp
diff options
context:
space:
mode:
authorJan Svoboda <jan_svoboda@apple.com>2025-04-25 07:38:51 -0700
committerGitHub <noreply@github.com>2025-04-25 07:38:51 -0700
commit77148fce6f35743c368e6c01ad24ebcec9fdea13 (patch)
tree061e06c2a4ef86e29d88c96e5628e01142eae6cc /clang/lib/Frontend/FrontendAction.cpp
parent09b012fa2d4f547e5359b8e1ace634b74bb9eebd (diff)
downloadllvm-77148fce6f35743c368e6c01ad24ebcec9fdea13.zip
llvm-77148fce6f35743c368e6c01ad24ebcec9fdea13.tar.gz
llvm-77148fce6f35743c368e6c01ad24ebcec9fdea13.tar.bz2
[clang] Do not share ownership of `HeaderSearchOptions` (#132984)
This PR makes it so that `CompilerInvocation` is the sole owner of the `HeaderSearchOptions` instance.
Diffstat (limited to 'clang/lib/Frontend/FrontendAction.cpp')
-rw-r--r--clang/lib/Frontend/FrontendAction.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/clang/lib/Frontend/FrontendAction.cpp b/clang/lib/Frontend/FrontendAction.cpp
index 1c4dec0..783d1a64 100644
--- a/clang/lib/Frontend/FrontendAction.cpp
+++ b/clang/lib/Frontend/FrontendAction.cpp
@@ -780,8 +780,7 @@ bool FrontendAction::BeginSourceFile(CompilerInstance &CI,
std::unique_ptr<ASTUnit> AST = ASTUnit::LoadFromASTFile(
InputFile, CI.getPCHContainerReader(), ASTUnit::LoadPreprocessorOnly,
- ASTDiags, CI.getFileSystemOpts(),
- /*HeaderSearchOptions=*/nullptr);
+ ASTDiags, CI.getFileSystemOpts(), CI.getHeaderSearchOpts());
if (!AST)
return false;
@@ -848,8 +847,7 @@ bool FrontendAction::BeginSourceFile(CompilerInstance &CI,
std::unique_ptr<ASTUnit> AST = ASTUnit::LoadFromASTFile(
InputFile, CI.getPCHContainerReader(), ASTUnit::LoadEverything, Diags,
- CI.getFileSystemOpts(), CI.getHeaderSearchOptsPtr(),
- CI.getLangOptsPtr());
+ CI.getFileSystemOpts(), CI.getHeaderSearchOpts(), CI.getLangOptsPtr());
if (!AST)
return false;