Prazek added inline comments.

================
Comment at: lib/CodeGen/CGClass.cpp:1832
@@ +1831,3 @@
+  // Generate vtable assumptions if we are calling dynamic class ctor
+  // and we are not in another ctor.
+  if (CGM.getCodeGenOpts().OptimizationLevel > 0 &&
----------------
hfinkel wrote:
> I think this comment should be a little more verbose. How about this:
> 
>   // Generate vtable assumptions if we are calling dynamic-class's ctor, 
> except when doing so as part of a derived class's ctor's base-class 
> initialization. Doing so in this latter case would be useless, because the 
> vtable is about to be overwritten by the derived class's vtable.
> 
The main point of not calling this function, is because it is useless to have 
assumption loads inside constructor, when they are generated also outside of 
ctor. I guess You could have case when You are not overriding base vptr, and 
You are calling base ctor from dynamic class


http://reviews.llvm.org/D11859



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to