aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/CompilerInstance.cpp
diff options
context:
space:
mode:
authorJan Svoboda <jan_svoboda@apple.com>2025-03-21 14:39:50 -0700
committerGitHub <noreply@github.com>2025-03-21 14:39:50 -0700
commit72e596f35951e849de9fc739238e84ec1217b939 (patch)
tree39da3f2eae7c8ccea4fc6038c576c7bdc68bd349 /clang/lib/Frontend/CompilerInstance.cpp
parent896df5c4bf77a9a8933c0a5cfdcabccad4c50471 (diff)
downloadllvm-72e596f35951e849de9fc739238e84ec1217b939.zip
llvm-72e596f35951e849de9fc739238e84ec1217b939.tar.gz
llvm-72e596f35951e849de9fc739238e84ec1217b939.tar.bz2
[clang] Make `HeaderSearchOptions` references const (#130825)
This PR makes the `HeaderSearchOptions` object referenced by `HeaderSearch` constant. Depends on #130823.
Diffstat (limited to 'clang/lib/Frontend/CompilerInstance.cpp')
-rw-r--r--clang/lib/Frontend/CompilerInstance.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/Frontend/CompilerInstance.cpp b/clang/lib/Frontend/CompilerInstance.cpp
index 02994bce..bff5326 100644
--- a/clang/lib/Frontend/CompilerInstance.cpp
+++ b/clang/lib/Frontend/CompilerInstance.cpp
@@ -631,7 +631,8 @@ IntrusiveRefCntPtr<ASTReader> CompilerInstance::createPCHExternalASTSource(
ArrayRef<std::shared_ptr<DependencyCollector>> DependencyCollectors,
void *DeserializationListener, bool OwnDeserializationListener,
bool Preamble, bool UseGlobalModuleIndex) {
- HeaderSearchOptions &HSOpts = PP.getHeaderSearchInfo().getHeaderSearchOpts();
+ const HeaderSearchOptions &HSOpts =
+ PP.getHeaderSearchInfo().getHeaderSearchOpts();
IntrusiveRefCntPtr<ASTReader> Reader(new ASTReader(
PP, ModCache, &Context, PCHContainerRdr, Extensions,