dblaikie added a comment.

(mentioned also on the LLVM side of this D74572 
<https://reviews.llvm.org/D74572>)

If this is in the interests of retaining certain types in the emitted debug 
info - it seems quite complicated compared to what I'd hope for. Would it be 
sufficient to support __attribute__((used)) on a type and have that force the 
type to be emitted into DWARF (this could be implemented using DICompileUNit's 
"retainedTypes" list (& is similar to what LLVM does for references to enum 
constants where the enum isn't otherwise used as a type in a function 
signature, variable, etc - attaching them to the DICompileUnit's "enums" 
list)). That seems like a more general purpose and tidier way that 
adding/removing things, having extra transformation passes, etc. (& even if 
__attribute__((used)) isn't suitable for your needs - at least, hopefully, you 
could still use DICompileUnit's retainedTypes list to save your types detected 
through some other means, and not need the backend pass to strip out these 
extra intrinsic calls, etc)?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D74668/new/

https://reviews.llvm.org/D74668



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to