================ @@ -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"; + SmallString<64> FuncName(Prefix); + if (!FailureMsg.empty()) { + // A space in the function name identifies this as not being a real function + // because it's not a valid symbol name. ---------------- delcypher wrote:
@adrian-prantl Sorry. This comment is based on an off-hand comment you made a while back in the context of `-fbounds-safety` (which only supports C) where I think you said having a space in the function name would distinguish the artificial function from any real function. While that's true for C I guess it's not true for other languages. https://github.com/llvm/llvm-project/pull/79230 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits