@@ -5293,7 +5293,7 @@ bool Compiler<Emitter>::compileDestructor(const CXXDestructorDecl *Dtor) {
52935293 if (!D->isPrimitive () && !D->isPrimitiveArray ()) {
52945294 if (!this ->emitGetPtrField (Field.Offset , SourceInfo{}))
52955295 return false ;
5296- if (!this ->emitDestruction (D))
5296+ if (!this ->emitDestruction (D, SourceInfo{} ))
52975297 return false ;
52985298 if (!this ->emitPopPtr (SourceInfo{}))
52995299 return false ;
@@ -5307,7 +5307,7 @@ bool Compiler<Emitter>::compileDestructor(const CXXDestructorDecl *Dtor) {
53075307
53085308 if (!this ->emitGetPtrBase (Base.Offset , SourceInfo{}))
53095309 return false ;
5310- if (!this ->emitRecordDestruction (Base.R ))
5310+ if (!this ->emitRecordDestruction (Base.R , {} ))
53115311 return false ;
53125312 if (!this ->emitPopPtr (SourceInfo{}))
53135313 return false ;
@@ -6148,7 +6148,7 @@ bool Compiler<Emitter>::emitComplexComparison(const Expr *LHS, const Expr *RHS,
61486148// / on the stack.
61496149// / Emit destruction of record types (or arrays of record types).
61506150template <class Emitter >
6151- bool Compiler<Emitter>::emitRecordDestruction(const Record *R) {
6151+ bool Compiler<Emitter>::emitRecordDestruction(const Record *R, SourceInfo Loc ) {
61526152 assert (R);
61536153 assert (!R->isAnonymousUnion ());
61546154 const CXXDestructorDecl *Dtor = R->getDestructor ();
@@ -6161,15 +6161,16 @@ bool Compiler<Emitter>::emitRecordDestruction(const Record *R) {
61616161 return false ;
61626162 assert (DtorFunc->hasThisPointer ());
61636163 assert (DtorFunc->getNumParams () == 1 );
6164- if (!this ->emitDupPtr (SourceInfo{} ))
6164+ if (!this ->emitDupPtr (Loc ))
61656165 return false ;
6166- return this ->emitCall (DtorFunc, 0 , SourceInfo{} );
6166+ return this ->emitCall (DtorFunc, 0 , Loc );
61676167}
61686168// / When calling this, we have a pointer of the local-to-destroy
61696169// / on the stack.
61706170// / Emit destruction of record types (or arrays of record types).
61716171template <class Emitter >
6172- bool Compiler<Emitter>::emitDestruction(const Descriptor *Desc) {
6172+ bool Compiler<Emitter>::emitDestruction(const Descriptor *Desc,
6173+ SourceInfo Loc) {
61736174 assert (Desc);
61746175 assert (!Desc->isPrimitive ());
61756176 assert (!Desc->isPrimitiveArray ());
@@ -6193,13 +6194,13 @@ bool Compiler<Emitter>::emitDestruction(const Descriptor *Desc) {
61936194 }
61946195
61956196 for (ssize_t I = Desc->getNumElems () - 1 ; I >= 0 ; --I) {
6196- if (!this ->emitConstUint64 (I, SourceInfo{} ))
6197+ if (!this ->emitConstUint64 (I, Loc ))
61976198 return false ;
6198- if (!this ->emitArrayElemPtrUint64 (SourceInfo{} ))
6199+ if (!this ->emitArrayElemPtrUint64 (Loc ))
61996200 return false ;
6200- if (!this ->emitDestruction (ElemDesc))
6201+ if (!this ->emitDestruction (ElemDesc, Loc ))
62016202 return false ;
6202- if (!this ->emitPopPtr (SourceInfo{} ))
6203+ if (!this ->emitPopPtr (Loc ))
62036204 return false ;
62046205 }
62056206 return true ;
@@ -6209,7 +6210,7 @@ bool Compiler<Emitter>::emitDestruction(const Descriptor *Desc) {
62096210 if (Desc->ElemRecord ->isAnonymousUnion ())
62106211 return true ;
62116212
6212- return this ->emitRecordDestruction (Desc->ElemRecord );
6213+ return this ->emitRecordDestruction (Desc->ElemRecord , Loc );
62136214}
62146215
62156216namespace clang {
0 commit comments