[PATCH] Fix PR16735 - emit the constructor for abstract classes

Timur Iskhodzhanov timurrrr at google.com
Wed Jul 31 10:42:21 PDT 2013

Comment at: lib/CodeGen/CGCXX.cpp:185
@@ -184,3 @@
-  // ignores virtual bases.
-  if (getTarget().getCXXABI().hasConstructorVariants())
-    EmitGlobal(GlobalDecl(D, Ctor_Base));
Reid Kleckner wrote:
> This seems fine.  Alternatively, we could consider Ctor_Base to be the "true" ctor variant that we always emit, and alias Ctor_Complete to Ctor_Base the way we do for dtors of classes with no virtual bases.  I'm not sure how invasive that would be.
We need to use _Complete for classes with vbases [unless we want ugly code],
and I don't think it's a good idea to have a mixture of two ways to create an object if there's no strong reason to do that.


More information about the cfe-commits mailing list