File tree Expand file tree Collapse file tree 2 files changed +14
-0
lines changed
Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -101,3 +101,14 @@ only if the non-reachability is not due to macro or template
101101metaprogramming.
102102
103103//===---------------------------------------------------------------------===//
104+
105+ We can still apply a modified version of the constructor/destructor
106+ delegation optimization in cases of virtual inheritance where:
107+ - there is no function-try-block,
108+ - the constructor signature is not variadic, and
109+ - the parameter variables can safely be copied and repassed
110+ to the base constructor because either
111+ - they have not had their addresses taken by the vbase initializers or
112+ - they were passed indirectly.
113+
114+ //===---------------------------------------------------------------------===//
Original file line number Diff line number Diff line change @@ -731,6 +731,9 @@ void CodeGenFunction::EmitConstructorBody(FunctionArgList &Args) {
731731
732732 EHScopeStack::stable_iterator CleanupDepth = EHStack.stable_begin ();
733733
734+ // TODO: in restricted cases, we can emit the vbase initializers of
735+ // a complete ctor and then delegate to the base ctor.
736+
734737 // Emit the constructor prologue, i.e. the base and member
735738 // initializers.
736739 EmitCtorPrologue (Ctor, CtorType, Args);
You can’t perform that action at this time.
0 commit comments