<div dir="ltr">(I think we had some discussion about this a few years back, but can't seem to find it in my email)<br><br>GCC doesn't put global variables/data into arranges, only functions/code - making arranges basically (entirely? so far as I know) the same as a CU's address range (high/low/ranges).<br><br>Clang does put global variables in aranges. The whole arange content is driven by the emission of address attributes on DIEs.<br><br>There's currently a bug (I introduced, someone else filed recently: <a href="https://bugs.llvm.org/show_bug.cgi?id=52187">https://bugs.llvm.org/show_bug.cgi?id=52187</a>) in aranges with gmlt caused by the highly minimal form of gmlt I implemented a few years ago that skips subprogram DIEs for subprograms with no inlining (they have enough info in the line table+symbol table to do good backtraces, so we can save space by skipping the subprogram description). But this means no address attributes are emitted for these functions, so they don't end up in the aranges table.<br><br>I think it might be simpler to fix this issue by making aranges be identical to CU ranges - this would be consistent with GCC's use of aranges (omitting globals) & reduce the chance of bugs of trying to keep two different lists in LLVM's implementation.<br><br>What do folks think?<br><br>(caveat: aranges are off by default in Clang because they seem redundant with CU ranges - I really don't understand why anyone's using them and we don't use them at Google... but bugs is bugs I guess)</div>