================
@@ -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
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to