aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/CompilerInstance.cpp
diff options
context:
space:
mode:
authorJan Svoboda <jan_svoboda@apple.com>2025-03-25 12:14:06 -0700
committerGitHub <noreply@github.com>2025-03-25 12:14:06 -0700
commit7a370748c0928b9ccfe26127e54eb3c1a1827d75 (patch)
treef978f04b7e0ae5f55008d635044a33d789cb711d /clang/lib/Frontend/CompilerInstance.cpp
parent613a077b05b8352a48695be295037306f5fca151 (diff)
downloadllvm-7a370748c0928b9ccfe26127e54eb3c1a1827d75.zip
llvm-7a370748c0928b9ccfe26127e54eb3c1a1827d75.tar.gz
llvm-7a370748c0928b9ccfe26127e54eb3c1a1827d75.tar.bz2
[clang][lex] Store non-owning options ref in `HeaderSearch` (#132780)
This makes it so that `CompilerInvocation` can be the only entity that manages ownership of `HeaderSearchOptions`, making it possible to implement copy-on-write semantics.
Diffstat (limited to 'clang/lib/Frontend/CompilerInstance.cpp')
-rw-r--r--clang/lib/Frontend/CompilerInstance.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Frontend/CompilerInstance.cpp b/clang/lib/Frontend/CompilerInstance.cpp
index bff5326..4e13b6c 100644
--- a/clang/lib/Frontend/CompilerInstance.cpp
+++ b/clang/lib/Frontend/CompilerInstance.cpp
@@ -451,7 +451,7 @@ void CompilerInstance::createPreprocessor(TranslationUnitKind TUKind) {
// Create the Preprocessor.
HeaderSearch *HeaderInfo =
- new HeaderSearch(getHeaderSearchOptsPtr(), getSourceManager(),
+ new HeaderSearch(getHeaderSearchOpts(), getSourceManager(),
getDiagnostics(), getLangOpts(), &getTarget());
PP = std::make_shared<Preprocessor>(Invocation->getPreprocessorOptsPtr(),
getDiagnostics(), getLangOpts(),