[clang] [CIR] Upstream support for null and virtual method pointers (PR #176522)
Sirui Mu via cfe-commits
cfe-commits at lists.llvm.org
Sat Jan 17 07:47:51 PST 2026
================
@@ -202,7 +202,29 @@ mlir::TypedAttr LowerItaniumCXXABI::lowerMethodConstant(
loweredMethodTy, mlir::ArrayAttr::get(attr.getContext(), {zero, zero}));
}
- assert(!cir::MissingFeatures::virtualMethodAttr());
+ if (attr.isVirtual()) {
+ if (useARMMethodPtrABI) {
+ // ARM C++ ABI 3.2.1:
+ // This ABI specifies that adj contains twice the this
+ // adjustment, plus 1 if the member function is virtual. The
+ // least significant bit of adj then makes exactly the same
+ // discrimination as the least significant bit of ptr does for
+ // Itanium.
+ llvm_unreachable("ARM method ptr abi NYI");
----------------
Lancern wrote:
Change this to a MissingFeature check.
https://github.com/llvm/llvm-project/pull/176522
More information about the cfe-commits
mailing list