diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2024-08-25 11:12:58 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2024-10-23 18:27:07 +0000 |
| commit | 62987288060ff68c817b7056815aa9fb8ba8ecd7 (patch) | |
| tree | d7953c9488f71e79d26c924169988f16e9ba9cee /contrib/llvm-project/clang/lib/Sema/SemaDecl.cpp | |
| parent | 52418fc2be8efa5172b90a3a9e617017173612c4 (diff) | |
| parent | adf62863f35c84e4c5708f3dc5a1589ce958a238 (diff) | |
Diffstat (limited to 'contrib/llvm-project/clang/lib/Sema/SemaDecl.cpp')
| -rw-r--r-- | contrib/llvm-project/clang/lib/Sema/SemaDecl.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/contrib/llvm-project/clang/lib/Sema/SemaDecl.cpp b/contrib/llvm-project/clang/lib/Sema/SemaDecl.cpp index 01231f8e385e..d608dd92a4b4 100644 --- a/contrib/llvm-project/clang/lib/Sema/SemaDecl.cpp +++ b/contrib/llvm-project/clang/lib/Sema/SemaDecl.cpp @@ -1219,7 +1219,7 @@ Corrected: return NameClassification::OverloadSet(UnresolvedLookupExpr::Create( Context, Result.getNamingClass(), SS.getWithLocInContext(Context), Result.getLookupNameInfo(), ADL, Result.begin(), Result.end(), - /*KnownDependent=*/false)); + /*KnownDependent=*/false, /*KnownInstantiationDependent=*/false)); } ExprResult @@ -18073,6 +18073,15 @@ 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 where 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. |
