[clang] Add support for builtin_verbose_trap (PR #79230)

Akira Hatanaka via cfe-commits cfe-commits at lists.llvm.org
Mon Mar 4 10:54:22 PST 2024


================
@@ -3424,6 +3443,26 @@ llvm::DIMacroFile *CGDebugInfo::CreateTempMacroFile(llvm::DIMacroFile *Parent,
   return DBuilder.createTempMacroFile(Parent, Line, FName);
 }
 
+llvm::DILocation *
+CGDebugInfo::CreateTrapFailureMessageFor(llvm::DebugLoc TrapLocation,
+                                         StringRef FailureMsg) {
+  // Create a debug location from `TrapLocation` that adds an artificial inline
+  // frame.
+  const char *Prefix = "__llvm_verbose_trap";
----------------
ahatanak wrote:

See https://github.com/llvm/llvm-project/pull/79230#discussion_r1471967969

Should we make it a parameter when we add support for `-fbounds-safety`?

https://github.com/llvm/llvm-project/pull/79230


More information about the cfe-commits mailing list