mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-04 22:02:52 +01:00
Export virtual/abstract/override functions as virtual (#7211)
This provides enough to Clang so it can include these new virtual functions in the vtable of Carbon types derived from C++ types.
This commit is contained in:
@@ -535,6 +535,9 @@ static auto BuildCppToCarbonThunkDecl(
|
||||
constexpr_kind, clang_loc, trailing_requires_clause);
|
||||
// TODO: Map Carbon access to C++ access.
|
||||
thunk_function_decl->setAccess(clang::AS_public);
|
||||
thunk_function_decl->setVirtualAsWritten(
|
||||
target.function.virtual_modifier !=
|
||||
SemIR::Function::VirtualModifier::None);
|
||||
} else {
|
||||
thunk_function_decl = clang::FunctionDecl::Create(
|
||||
ast_context, target.decl_context, clang_loc, name_info,
|
||||
|
||||
Reference in New Issue
Block a user