[llvm] DWARF: Emit `DW_AT_artificial` on artificial globals (PR #93118)
Paul T Robinson via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 12 12:10:31 PDT 2024
pogo59 wrote:
> > DIFlags is getting pretty full (again) and I'd be reluctant to add Artificial to it just to support this case.
>
> Hmm? `DIFlagArtificial` already exists -- the possible addition was that globals currently don't have flags at all.
Ah, right. Not sure how I missed that. Moving the Flags member up to DIVariable makes some sense then.
I do wonder whether DILocalVariable really needs a whole DIFlags member; it might be worth auditing which flags it actually uses, and maybe we're better off with independent bool fields like DIGlobalVariable has. DILocalVariable has only two member functions that query specific flags, one of which is the Artificial flag that we want to be in common with DIGlobalVariable now.
https://github.com/llvm/llvm-project/pull/93118
More information about the llvm-commits
mailing list