[clang] [clang][CodeGen] Added SanitizerHandler mapping, trap messages in debug info, and corresponding test cases. (PR #143758)
Dan Liew via cfe-commits
cfe-commits at lists.llvm.org
Mon Jun 23 07:29:15 PDT 2025
================
@@ -4051,6 +4144,14 @@ void CodeGenFunction::EmitTrapCheck(llvm::Value *Checked,
llvm::BasicBlock *&TrapBB = TrapBBs[CheckHandlerID];
+ llvm::DILocation *TrapLocation = Builder.getCurrentDebugLocation();
+ llvm::StringRef Category = GetTrapMessageForHandler(CheckHandlerID);
+
+ if (getDebugInfo() && !Category.empty()) {
+ TrapLocation = getDebugInfo()->CreateTrapFailureMessageFor(
+ TrapLocation, Category, TrapMessage);
----------------
delcypher wrote:
This looks resolved so I'll marked this as resolved.
https://github.com/llvm/llvm-project/pull/143758
More information about the cfe-commits
mailing list