[clang] Add support for builtin_verbose_trap (PR #79230)
Dan Liew via cfe-commits
cfe-commits at lists.llvm.org
Thu Feb 1 14:10:18 PST 2024
================
@@ -1628,6 +1628,25 @@ llvm::DIType *CGDebugInfo::createFieldType(
offsetInBits, flags, debugType, Annotations);
}
+llvm::DISubprogram *
+CGDebugInfo::createInlinedTrapSubprogram(StringRef FuncName,
+ llvm::DIFile *FileScope) {
+ llvm::DISubprogram *&SP = InlinedTrapFuncMap[FuncName];
----------------
delcypher wrote:
I think it's worth adding a comment here explaining **why** we are caching the sub-programs.
The goal is to avoid creating duplicate sub program nodes because `llvm::DISubprogram::SPFlagDefinition` prevents unique-ing.
https://github.com/llvm/llvm-project/pull/79230
More information about the cfe-commits
mailing list