@@ -5432,8 +5432,7 @@ bool Compiler<Emitter>::VisitCXXThisExpr(const CXXThisExpr *E) {
54325432 unsigned EndIndex = 0 ;
54335433 // Find the init list.
54345434 for (StartIndex = InitStack.size () - 1 ; StartIndex > 0 ; --StartIndex) {
5435- if (InitStack[StartIndex].Kind == InitLink::K_InitList ||
5436- InitStack[StartIndex].Kind == InitLink::K_This) {
5435+ if (InitStack[StartIndex].Kind == InitLink::K_DIE) {
54375436 EndIndex = StartIndex;
54385437 --StartIndex;
54395438 break ;
@@ -5446,7 +5445,8 @@ bool Compiler<Emitter>::VisitCXXThisExpr(const CXXThisExpr *E) {
54465445 continue ;
54475446
54485447 if (InitStack[StartIndex].Kind != InitLink::K_Field &&
5449- InitStack[StartIndex].Kind != InitLink::K_Elem)
5448+ InitStack[StartIndex].Kind != InitLink::K_Elem &&
5449+ InitStack[StartIndex].Kind != InitLink::K_DIE)
54505450 break ;
54515451 }
54525452
@@ -5457,7 +5457,8 @@ bool Compiler<Emitter>::VisitCXXThisExpr(const CXXThisExpr *E) {
54575457
54585458 // Emit the instructions.
54595459 for (unsigned I = StartIndex; I != (EndIndex + 1 ); ++I) {
5460- if (InitStack[I].Kind == InitLink::K_InitList)
5460+ if (InitStack[I].Kind == InitLink::K_InitList ||
5461+ InitStack[I].Kind == InitLink::K_DIE)
54615462 continue ;
54625463 if (!InitStack[I].template emit <Emitter>(this , E))
54635464 return false ;
@@ -6328,8 +6329,8 @@ bool Compiler<Emitter>::compileConstructor(const CXXConstructorDecl *Ctor) {
63286329
63296330 unsigned FirstLinkOffset =
63306331 R->getField (cast<FieldDecl>(IFD->chain ()[0 ]))->Offset ;
6331- InitStackScope<Emitter> ISS (this , isa<CXXDefaultInitExpr>(InitExpr));
63326332 InitLinkScope<Emitter> ILS (this , InitLink::Field (FirstLinkOffset));
6333+ InitStackScope<Emitter> ISS (this , isa<CXXDefaultInitExpr>(InitExpr));
63336334 if (!emitFieldInitializer (NestedField, NestedFieldOffset, InitExpr,
63346335 IsUnion))
63356336 return false ;
0 commit comments