[clang] Add support for builtin_verbose_trap (PR #79230)
Dan Liew via cfe-commits
cfe-commits at lists.llvm.org
Mon Mar 18 16:08:29 PDT 2024
================
@@ -3424,6 +3447,24 @@ 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 = CLANG_VERBOSE_TRAP_PREFIX;
----------------
delcypher wrote:
The `Prefix` should not be hardcoded. It should be a parameter to `CreateTrapFailureMessageFor` so it can be re-used by other things like `-fbounds-safety`
https://github.com/llvm/llvm-project/pull/79230
More information about the cfe-commits
mailing list