[PATCH] D63161: Devirtualize destructor of final class.

Hiroshi Yamauchi via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jun 17 15:21:09 PDT 2019


yamauchi marked 2 inline comments as done.
yamauchi added inline comments.


================
Comment at: lib/CodeGen/CGExprCXX.cpp:1887
+            Dtor = DevirtualizedDtor;
+            Ptr = CGF.EmitPointerWithAlignment(Inner);
+          } else {
----------------
rsmith wrote:
> In this case we'll emit the inner expression (including its side-effects) twice.
> 
> The simplest thing to do would be to just drop this `else if` case for now and add a FIXME.
I'd go with that. I assume there isn't a simple way to adjust the this pointer of a base class given a derived class? Sort of like CodeGenFunction::GetAddressOfDerivedClass?



Repository:
  rC Clang

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D63161/new/

https://reviews.llvm.org/D63161





More information about the cfe-commits mailing list