[PATCH] D61454: [CodeGen][ObjC] Remove the leading 'l_' from ObjC symbols and make private symbols in the __DATA segment internal.
Akira Hatanaka via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri May 3 01:05:58 PDT 2019
ahatanak marked an inline comment as done.
ahatanak added inline comments.
================
Comment at: lib/CodeGen/CGObjCMac.cpp:7266
+ false,
+ CGM.getTriple().isOSBinFormatMachO()
+ ? llvm::GlobalValue::InternalLinkage
----------------
ahatanak wrote:
> compnerd wrote:
> > Is there a reason to not make this and the other instances `Internal` irrespective of the object file format?
> When the object file format isn't MachO, this variable doesn't go into a section that is in `__DATA`, so we want to keep the variable private to avoid needlessly preserving the symbol name.
>
> The intent of the patch is to prevent the linker from removing the symbol names of symbols in `__DATA` so that tools can collect information about those symbols.
I realized that there are other places where I should check the object file format so that the linkage isn't changed to internal when it doesn't have to be changed.
Repository:
rC Clang
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D61454/new/
https://reviews.llvm.org/D61454
More information about the cfe-commits
mailing list