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

Akira Hatanaka via cfe-commits cfe-commits at lists.llvm.org
Wed Apr 24 20:10:56 PDT 2024


================
@@ -3424,6 +3445,26 @@ llvm::DIMacroFile *CGDebugInfo::CreateTempMacroFile(llvm::DIMacroFile *Parent,
   return DBuilder.createTempMacroFile(Parent, Line, FName);
 }
 
+llvm::DILocation *CGDebugInfo::CreateTrapFailureMessageFor(
----------------
ahatanaka wrote:

I've updated the patch to pass a category string to the builtin. The artificial function name has the format `<prefix>:<category>:<message>` where `<prefix>` is always `__builtin_verbose_trap`.

We should probably use something other than `:` for the separator as users might want to use it in the category or message string (e.g., `boost::some_library_name`).

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


More information about the cfe-commits mailing list