================
@@ -2069,6 +2072,12 @@ void CodeGenFunction::EmitCXXDeleteExpr(const
CXXDeleteExpr *E) {
const Expr *Arg = E->getArgument();
Address Ptr = EmitPointerWithAlignment(Arg);
+ // If this delete expression uses global ::operator delete (not a
+ // class-specific one), note it so we emit __global_delete forwarding bodies.
+ if (!isa<CXXMethodDecl>(E->getOperatorDelete()) &&
+ CGM.getTarget().getCXXABI().isMicrosoft())
+ CGM.noteDirectGlobalDelete();
----------------
efriedma-quic wrote:
I think this is supposed to be specifically looking a `::delete` expression
involving a class with a member delete, not just any delete which calls a
global operator delete.
We also need to handle the case where the class is dllexport.
https://github.com/llvm/llvm-project/pull/188372
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits