aboutsummaryrefslogtreecommitdiff
path: root/clang/unittests/Lex/LexerTest.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/unittests/Lex/LexerTest.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/unittests/Lex/LexerTest.cpp')
-rw-r--r--clang/unittests/Lex/LexerTest.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/unittests/Lex/LexerTest.cpp b/clang/unittests/Lex/LexerTest.cpp
index 29c61fe..96a0717 100644
--- a/clang/unittests/Lex/LexerTest.cpp
+++ b/clang/unittests/Lex/LexerTest.cpp
@@ -57,8 +57,8 @@ protected:
llvm::MemoryBuffer::getMemBuffer(Source);
SourceMgr.setMainFileID(SourceMgr.createFileID(std::move(Buf)));
- HeaderSearch HeaderInfo(std::make_shared<HeaderSearchOptions>(), SourceMgr,
- Diags, LangOpts, Target.get());
+ HeaderSearchOptions HSOpts;
+ HeaderSearch HeaderInfo(HSOpts, SourceMgr, Diags, LangOpts, Target.get());
std::unique_ptr<Preprocessor> PP = std::make_unique<Preprocessor>(
std::make_shared<PreprocessorOptions>(), Diags, LangOpts, SourceMgr,
HeaderInfo, ModLoader,