================ @@ -3452,6 +3452,18 @@ RValue CodeGenFunction::EmitBuiltinExpr(const GlobalDecl GD, unsigned BuiltinID, case Builtin::BI__builtin_trap: EmitTrapCall(Intrinsic::trap); return RValue::get(nullptr); + case Builtin::BI__builtin_verbose_trap: { + llvm::DILocation *TrapLocation = Builder.getCurrentDebugLocation(); + if (getDebugInfo()) { + std::string Str; + E->getArg(0)->tryEvaluateString(Str, getContext()); + TrapLocation = + getDebugInfo()->CreateTrapFailureMessageFor(TrapLocation, Str); + } + ApplyDebugLocation ApplyTrapDI(*this, TrapLocation); + EmitTrapCall(Intrinsic::trap); ---------------- delcypher wrote:
Please leave a comment in the code indicating that currently no attempt is made to prevent traps being merged. https://github.com/llvm/llvm-project/pull/79230 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits