forked from OSchip/llvm-project
Add a note about a missing optimization in the case of virtual
inheritance. llvm-svn: 153722
This commit is contained in:
parent
5a125b4040
commit
8831303e4f
|
@ -101,3 +101,14 @@ only if the non-reachability is not due to macro or template
|
|||
metaprogramming.
|
||||
|
||||
//===---------------------------------------------------------------------===//
|
||||
|
||||
We can still apply a modified version of the constructor/destructor
|
||||
delegation optimization in cases of virtual inheritance where:
|
||||
- there is no function-try-block,
|
||||
- the constructor signature is not variadic, and
|
||||
- the parameter variables can safely be copied and repassed
|
||||
to the base constructor because either
|
||||
- they have not had their addresses taken by the vbase initializers or
|
||||
- they were passed indirectly.
|
||||
|
||||
//===---------------------------------------------------------------------===//
|
||||
|
|
|
@ -731,6 +731,9 @@ void CodeGenFunction::EmitConstructorBody(FunctionArgList &Args) {
|
|||
|
||||
EHScopeStack::stable_iterator CleanupDepth = EHStack.stable_begin();
|
||||
|
||||
// TODO: in restricted cases, we can emit the vbase initializers of
|
||||
// a complete ctor and then delegate to the base ctor.
|
||||
|
||||
// Emit the constructor prologue, i.e. the base and member
|
||||
// initializers.
|
||||
EmitCtorPrologue(Ctor, CtorType, Args);
|
||||
|
|
Loading…
Reference in New Issue