aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Sema/SemaDecl.cpp
diff options
context:
space:
mode:
authorChuanqi Xu <yedeng.yd@linux.alibaba.com>2024-07-10 10:46:23 +0800
committerChuanqi Xu <yedeng.yd@linux.alibaba.com>2024-07-10 10:58:18 +0800
commit91d40ef6e369a73b0147d9153a95c3bc63e14102 (patch)
tree5b2d00e9ca9c76c394a9d7d46dd9c84abad2d356 /clang/lib/Sema/SemaDecl.cpp
parent9af1f8fbad6c8c38e7e3d6c1cfe7e4b2519db3d8 (diff)
downloadllvm-91d40ef6e369a73b0147d9153a95c3bc63e14102.zip
llvm-91d40ef6e369a73b0147d9153a95c3bc63e14102.tar.gz
llvm-91d40ef6e369a73b0147d9153a95c3bc63e14102.tar.bz2
Revert "[C++20] [Modules] [Itanium ABI] Generate the vtable in the module unit of dynamic classes (#75912)"
This reverts commit 18f3bcbb13ca83d33223b00761d8cddf463e9ffb, 15bb02650e26875c48889053d6a9697444583721 and 99873b35da7ecb905143c8a6b8deca4d4416f1a9. See the post commit message in https://github.com/llvm/llvm-project/pull/75912 to see the reasons.
Diffstat (limited to 'clang/lib/Sema/SemaDecl.cpp')
-rw-r--r--clang/lib/Sema/SemaDecl.cpp11
1 files changed, 1 insertions, 10 deletions
diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp
index 97e1f7e..d1c7b9d 100644
--- a/clang/lib/Sema/SemaDecl.cpp
+++ b/clang/lib/Sema/SemaDecl.cpp
@@ -10094,7 +10094,7 @@ Sema::ActOnFunctionDeclarator(Scope *S, Declarator &D, DeclContext *DC,
// check at the end of the TU (or when the PMF starts) to see that we
// have a definition at that point.
if (isInline && !D.isFunctionDefinition() && getLangOpts().CPlusPlus20 &&
- NewFD->isInNamedModule()) {
+ NewFD->hasOwningModule() && NewFD->getOwningModule()->isNamedModule()) {
PendingInlineFuncDecls.insert(NewFD);
}
}
@@ -18031,15 +18031,6 @@ void Sema::ActOnTagFinishDefinition(Scope *S, Decl *TagD,
if (NumInitMethods > 1 || !Def->hasInitMethod())
Diag(RD->getLocation(), diag::err_sycl_special_type_num_init_method);
}
-
- // If we're defining a dynamic class in a module interface unit, we always
- // need to produce the vtable for it even if the vtable is not used in the
- // current TU.
- //
- // The case that the current class is not dynamic is handled in
- // MarkVTableUsed.
- if (getCurrentModule() && getCurrentModule()->isInterfaceOrPartition())
- MarkVTableUsed(RD->getLocation(), RD, /*DefinitionRequired=*/true);
}
// Exit this scope of this tag's definition.