mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 06:31:03 +01:00
Handle "gaps" in C++ vtables. (#7206)
Not every entry in a C++ vtable corresponds to a function that we want to import. For the holes, leave a `SemIR::InstId::None` in the vtable. Also mark vtables that extend a C++ vtable as being non-Carbon-native so we don't try to lower them (and crash on the `None` entries). In particular, we leave holes for destructors, since we don't have destructor declarations on the Carbon side that need to override them.
This commit is contained in:
@@ -522,6 +522,8 @@ fn GenericUse(p2: Generic(Cpp.Class1)) {
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: vtable @Bar.vtable {
|
||||
// CHECK:STDOUT: invalid
|
||||
// CHECK:STDOUT: invalid
|
||||
// CHECK:STDOUT: imports.%Bar.f.decl
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
|
||||
Reference in New Issue
Block a user