[clang] [CIR] Implement the relative-vtable RTTI definitions (PR #248103)

via cfe-commits cfe-commits at lists.llvm.org
Wed Dec 2 07:51:04 PST 2026


llvmorg-github-actions[bot] wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-clangir

Author: Erich Keane (erichkeane)

<details>
<summary>Changes</summary>

As mentioned on the previous patch, we were missing the ability to build a VTablePointer in relative Vtable mode.  This patch implements that,
  and tests it by removing the previous -fno-rtti lines.

Additionally, this removes the vtableRelativeLayout MissingFeature, as all of the callsites in CIRGenVTables are handled in lowering.

Finally, this adds a test for relative-vtable-calls, which was missing test coverage, and managed to be implemented 'accidentially' along the way.

---
Full diff: https://github.com/llvm/llvm-project/pull/248103.diff


5 Files Affected:

- (modified) clang/include/clang/CIR/MissingFeatures.h (-1) 
- (modified) clang/lib/CIR/CodeGen/CIRGenItaniumCXXABI.cpp (+31-27) 
- (modified) clang/lib/CIR/CodeGen/CIRGenVTables.cpp (+4-10) 
- (added) clang/test/CIR/CodeGenCXX/relative-vtable-calls.cpp (+125) 
- (modified) clang/test/CIR/CodeGenCXX/relative-vtable-definitions.cpp (+57-28) 


``````````diff
The server is unavailable at this time. Please wait a few minutes before you try again.
``````````

</details>


https://github.com/llvm/llvm-project/pull/248103


More information about the cfe-commits mailing list