================
@@ -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");
----------------
andykaylor wrote:

I've been trying to limit `MissingFeature` to places where additional handling 
is needed for completeness but the code generally does something reasonable 
without the missing code. In this case, it we were to ignore the fact that the 
ARM method pointer ABI isn't handled, we would generate incorrect code. While 
that's generally true of a lot of ABI handling elsewhere, the other cases are 
more centralized ABI processing that is entirely missing. With this being a 
localized change, I think it would be easy to overlook what's missing here, so 
I would prefer for it to fail loudly.

https://github.com/llvm/llvm-project/pull/176522
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to