[clang] Add support for builtin_verbose_trap (PR #79230)
David Blaikie via cfe-commits
cfe-commits at lists.llvm.org
Tue Jan 30 13:13:15 PST 2024
================
@@ -3424,6 +3445,26 @@ llvm::DIMacroFile *CGDebugInfo::CreateTempMacroFile(llvm::DIMacroFile *Parent,
return DBuilder.createTempMacroFile(Parent, Line, FName);
}
+llvm::DILocation *CGDebugInfo::CreateTrapFailureMessageFor(
+ llvm::DebugLoc TrapLocation, StringRef Prefix, StringRef FailureMsg) {
+ assert((!FailureMsg.empty() || Prefix.find(' ') != std::string::npos) &&
+ "Prefix must contain a space when FailureMsg is empty");
+
+ // Create debug info that describes an inlined function whose name is the
+ // failure message.
+ std::string FuncName(Prefix);
----------------
dwblaikie wrote:
`llvm::SmallString`?
https://github.com/llvm/llvm-project/pull/79230
More information about the cfe-commits
mailing list