@@ -3118,6 +3118,8 @@ static bool mayDirectlyCallAsync(SILFunction *fn) {
31183118
31193119void IRGenSILFunction::visitFunctionRefBaseInst (FunctionRefBaseInst *i) {
31203120 auto fn = i->getInitiallyReferencedFunction ();
3121+ PrettyStackTraceSILFunction entry (" lowering reference to" , fn);
3122+
31213123 auto fnType = fn->getLoweredFunctionType ();
31223124
31233125 auto fpKind = irgen::classifyFunctionPointerKind (fn);
@@ -8101,6 +8103,8 @@ void IRGenSILFunction::visitWitnessMethodInst(swift::WitnessMethodInst *i) {
81018103 CanType baseTy = i->getLookupType ();
81028104 ProtocolConformanceRef conformance = i->getConformance ();
81038105 SILDeclRef member = i->getMember ();
8106+ PrettyStackTraceSILDeclRef entry (" lowering use of witness method" , member);
8107+
81048108 auto fnType = IGM.getSILTypes ().getConstantFunctionType (
81058109 IGM.getMaximalTypeExpansionContext (), member);
81068110
@@ -8285,6 +8289,7 @@ void IRGenSILFunction::visitSuperMethodInst(swift::SuperMethodInst *i) {
82858289 llvm::Value *baseValue = base.claimNext ();
82868290
82878291 auto method = i->getMember ().getOverriddenVTableEntry ();
8292+ PrettyStackTraceSILDeclRef entry (" lowering super call to" , method);
82888293 auto methodType = i->getType ().castTo <SILFunctionType>();
82898294
82908295 auto *classDecl = cast<ClassDecl>(method.getDecl ()->getDeclContext ());
@@ -8381,6 +8386,8 @@ void IRGenSILFunction::visitClassMethodInst(swift::ClassMethodInst *i) {
83818386 llvm::Value *baseValue = base.claimNext ();
83828387
83838388 SILDeclRef method = i->getMember ().getOverriddenVTableEntry ();
8389+ PrettyStackTraceSILDeclRef entry (" lowering class method call to" , method);
8390+
83848391 auto methodType = i->getType ().castTo <SILFunctionType>();
83858392
83868393 auto *classDecl = cast<ClassDecl>(method.getDecl ()->getDeclContext ());
0 commit comments