================ @@ -4051,6 +4141,14 @@ void CodeGenFunction::EmitTrapCheck(llvm::Value *Checked, llvm::BasicBlock *&TrapBB = TrapBBs[CheckHandlerID]; + llvm::DILocation *TrapLocation = Builder.getCurrentDebugLocation(); + llvm::StringRef TrapMessage = GetUBSanTrapForHandler(CheckHandlerID); + + if (getDebugInfo() && !TrapMessage.empty()) { + TrapLocation = getDebugInfo()->CreateTrapFailureMessageFor( ---------------- Michael137 wrote:
Lets add an: ```suggestion if (getDebugInfo() && !TrapMessage.empty()) { assert (TrapLocation && "Artificial trap frame requires valid debug-info for its scope.") TrapLocation = getDebugInfo()->CreateTrapFailureMessageFor( ``` So if we run into the crash again this will be easier to spot https://github.com/llvm/llvm-project/pull/145967 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits