aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Sema/MultiplexExternalSemaSource.cpp
diff options
context:
space:
mode:
authorChuanqi Xu <yedeng.yd@linux.alibaba.com>2025-01-17 12:46:00 +0800
committerGitHub <noreply@github.com>2025-01-17 12:46:00 +0800
commit263fed7ce9d2c155af44829018673caa67fa4f47 (patch)
tree9e63a4d0789dd0c7893b98d830b34f4c4439d2c7 /clang/lib/Sema/MultiplexExternalSemaSource.cpp
parenta4e87da963a67aed33b672582406d576553b2399 (diff)
downloadllvm-263fed7ce9d2c155af44829018673caa67fa4f47.zip
llvm-263fed7ce9d2c155af44829018673caa67fa4f47.tar.gz
llvm-263fed7ce9d2c155af44829018673caa67fa4f47.tar.bz2
[AST] Add OriginalDC argument to ExternalASTSource::FindExternalVisibleDeclsByName (#123152)
Part for relanding https://github.com/llvm/llvm-project/pull/122887. I split this to test where the performance regession comes from if modules are not used.
Diffstat (limited to 'clang/lib/Sema/MultiplexExternalSemaSource.cpp')
-rw-r--r--clang/lib/Sema/MultiplexExternalSemaSource.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/clang/lib/Sema/MultiplexExternalSemaSource.cpp b/clang/lib/Sema/MultiplexExternalSemaSource.cpp
index 5494426..6d94530 100644
--- a/clang/lib/Sema/MultiplexExternalSemaSource.cpp
+++ b/clang/lib/Sema/MultiplexExternalSemaSource.cpp
@@ -107,11 +107,13 @@ MultiplexExternalSemaSource::hasExternalDefinitions(const Decl *D) {
return EK_ReplyHazy;
}
-bool MultiplexExternalSemaSource::
-FindExternalVisibleDeclsByName(const DeclContext *DC, DeclarationName Name) {
+bool MultiplexExternalSemaSource::FindExternalVisibleDeclsByName(
+ const DeclContext *DC, DeclarationName Name,
+ const DeclContext *OriginalDC) {
bool AnyDeclsFound = false;
for (size_t i = 0; i < Sources.size(); ++i)
- AnyDeclsFound |= Sources[i]->FindExternalVisibleDeclsByName(DC, Name);
+ AnyDeclsFound |=
+ Sources[i]->FindExternalVisibleDeclsByName(DC, Name, OriginalDC);
return AnyDeclsFound;
}