-
Notifications
You must be signed in to change notification settings - Fork 95
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Vtable support for simple multiple inheritance without thunk #566
Comments
The idea when
This is old, not even using opaque pointers. As a general advice, I suggest you base up your investigations on top of clang-18 or trunk.
We should do a better job, for sure. LLVM codegen has a somewhat lazy approach for global variables, so it's not exactly like you are pointing out. Any improvements here should definitely account for a similar approach from the original LLVM codegen. Thanks for pointing out (1) and (2), as you noticed, they are pre-requisites into implementing multiple inheritance. |
Thank you for your response. Please review the discussion about the vtable type in this PR. #569 |
#569 has landed, so we should be good to close this out. |
I found that CIR currently does not support multiple inheritance, so I am trying to support this feature. However, I encountered two issues:
cir.ptr<!s8i>
instead ofcir.ptr<!u8i>
?llvm ir 12.0.1:
The modified cir:
clangir/clang/lib/CIR/CodeGen/CIRGenModule.cpp
Lines 559 to 562 in 5dc3353
But the position of the function may change due to
applyReplacements()
, which may cause vtable symbols to not be found in the symbol table for cir2mlir lowering (for caseclang/test/CIR/CodeGen/vtable-rtti.cpp
). So, similar to LLVM IR, Should the insertion of global variables be centralized at the beginning of the module?The text was updated successfully, but these errors were encountered: