[PATCH] D153907: [AIX] [TOC] Add -mtocdata/-mno-tocdata options on AIX

Hubert Tong via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 19 07:28:27 PDT 2023


hubert.reinterpretcast added inline comments.


================
Comment at: clang/docs/UsersManual.rst:3162
+
+The user may specify which global variables they wish to be treated as TOC
+data and which they don't. The effects of the toc-data attribute only take
----------------
hubert.reinterpretcast wrote:
> What do you mean by "global variable"? Do internal linkage variables at global scope count? Do variables in named C++ namespaces (or static data members of classes) count? How are they to be named by the options?
> 
> I guess block-scope variables with static storage duration don't count.
> 
> Whether they count or not, the effect of applying "blanket" `-mtocdata` upon such variables should be tested.
> 
> I guess block-scope variables with static storage duration don't count.

For the IBM XL compiler, block-scope variables with static storage duration do become toc-data when they are not part of the static pool (e.g., block-scope static in a C++ inline function).



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

https://reviews.llvm.org/D153907



More information about the llvm-commits mailing list