================
@@ -2175,6 +2178,22 @@ mlir::Value 
CIRGenItaniumCXXABI::emitDynamicCast(CIRGenFunction &cgf,
                                         isRefCast, castInfo);
 }
 
+/// The Itanium ABI always places an offset to the complete object
+/// at entry -2 in the vtable.
+void CIRGenItaniumCXXABI::emitVirtualObjectDelete(
+    CIRGenFunction &cgf, const CXXDeleteExpr *delExpr, Address ptr,
+    QualType elementType, const CXXDestructorDecl *dtor) {
+  bool useGlobalDelete = delExpr->isGlobalDelete();
+  if (useGlobalDelete) {
+    cgf.cgm.errorNYI(delExpr->getSourceRange(),
+                     "emitVirtualObjectDelete: global delete");
+    return;
+  }
+
+  CXXDtorType dtorType = useGlobalDelete ? Dtor_Complete : Dtor_Deleting;
----------------
erichkeane wrote:

Hmm, I get that we want this here for future direction, but this is dead with 
the 'return' above.  Is it problematic here to have it just drop-through?  
Classic-compiler seems to just be diving into the vtable pointer, then doing a 
cleanup block before/after.

So fall-through would just miss this cleanup, so it would still be valid.  
So... remove the return above I guess is my suggestion.


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

Reply via email to