================ @@ -4051,6 +4137,15 @@ void CodeGenFunction::EmitTrapCheck(llvm::Value *Checked, llvm::BasicBlock *&TrapBB = TrapBBs[CheckHandlerID]; + llvm::DILocation *TrapLocation = Builder.getCurrentDebugLocation(); + llvm::StringRef Category = "UBSan Trap Reason"; ---------------- delcypher wrote:
Given that `Category` is only used in one place I would be tempted to inline its use. I.e. ``` TrapLocation = getDebugInfo()->CreateTrapFailureMessageFor( TrapLocation, "UBSan", TrapMessage); ``` I realize that might conflict more with the code in Apple's fork of Clang but I'm ok with this. Once we've handled the merge conflict we'll have a better sense of what follow up changes are needed to best resolve the conflict. Nit: We may want to rename `UBSan Trap Reason`. I'm not sure it's necessary to mention `Trap` or `Reason`. I think `UBSan` or `Undefined Behavior Sanitizer` (if we wanted to be really verbose) would be sufficient. https://github.com/llvm/llvm-project/pull/143758 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits