[PATCH] D61454: [CodeGen][ObjC] Remove the leading 'l_' from ObjC symbols and make private symbols in the __DATA segment internal.

2019-05-09 Thread Akira Hatanaka via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC360359: [CodeGen][ObjC] Remove the leading `l_` from ObjC symbols and make (authored by ahatanak, committed by ). Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61454/new/

[PATCH] D61454: [CodeGen][ObjC] Remove the leading 'l_' from ObjC symbols and make private symbols in the __DATA segment internal.

2019-05-08 Thread Vedant Kumar via Phabricator via cfe-commits
vsk accepted this revision. vsk added a comment. This revision is now accepted and ready to land. Lgtm, thanks! Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61454/new/ https://reviews.llvm.org/D61454 ___ cfe-commits

[PATCH] D61454: [CodeGen][ObjC] Remove the leading 'l_' from ObjC symbols and make private symbols in the __DATA segment internal.

2019-05-07 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak updated this revision to Diff 198581. ahatanak marked an inline comment as done. ahatanak added a comment. Define helper function `getLinkageTypeForObjCMetadata`. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61454/new/ https://reviews.llvm.org/D61454 F

[PATCH] D61454: [CodeGen][ObjC] Remove the leading 'l_' from ObjC symbols and make private symbols in the __DATA segment internal.

2019-05-07 Thread Vedant Kumar via Phabricator via cfe-commits
vsk added inline comments. Comment at: lib/CodeGen/CGObjCMac.cpp:6039 +LT = llvm::GlobalValue::PrivateLinkage; + } + I see some minor variant of this logic repeated a few times. Wdyt of defining a 'getLinkageTypeForObjCMetadata(CGM, Section)' helper to cons

[PATCH] D61454: [CodeGen][ObjC] Remove the leading 'l_' from ObjC symbols and make private symbols in the __DATA segment internal.

2019-05-03 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak updated this revision to Diff 198118. ahatanak added a comment. Make sure private linkage is replaced with internal linkage only when the object file format is MachO. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61454/new/ https://reviews.llvm.org/D614

[PATCH] D61454: [CodeGen][ObjC] Remove the leading 'l_' from ObjC symbols and make private symbols in the __DATA segment internal.

2019-05-03 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak marked an inline comment as done. ahatanak added inline comments. Comment at: lib/CodeGen/CGObjCMac.cpp:7266 + false, + CGM.getTriple().isOSBinFormatMachO() +

[PATCH] D61454: [CodeGen][ObjC] Remove the leading 'l_' from ObjC symbols and make private symbols in the __DATA segment internal.

2019-05-03 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak marked 2 inline comments as done. ahatanak added inline comments. Comment at: lib/CodeGen/CGObjCMac.cpp:3961 + // linkage so that the linker preserves the symbol name. + llvm::GlobalValue::LinkageTypes LT = + Section.empty() || Section.startswith("__DATA") ---

[PATCH] D61454: [CodeGen][ObjC] Remove the leading 'l_' from ObjC symbols and make private symbols in the __DATA segment internal.

2019-05-03 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd added inline comments. Comment at: lib/CodeGen/CGObjCMac.cpp:3961 + // linkage so that the linker preserves the symbol name. + llvm::GlobalValue::LinkageTypes LT = + Section.empty() || Section.startswith("__DATA") Hmm, when would you have a metada

[PATCH] D61454: [CodeGen][ObjC] Remove the leading 'l_' from ObjC symbols and make private symbols in the __DATA segment internal.

2019-05-02 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak updated this revision to Diff 197918. ahatanak marked 2 inline comments as done. ahatanak added a comment. - Instead of passing a flag to `CreateMetadataVar` that indicates the section is in segment `__DATA`, just scan the section name string inside `CreateMetadataVar`. - Fix test case

[PATCH] D61454: [CodeGen][ObjC] Remove the leading 'l_' from ObjC symbols and make private symbols in the __DATA segment internal.

2019-05-02 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: lib/CodeGen/CGObjCMac.cpp:3961 + // linkage so that the linker preserves the symbol name. + llvm::GlobalValue::LinkageTypes LT = ExplicitDataSegment || Section.empty() + ? llvm::GlobalValue::I

[PATCH] D61454: [CodeGen][ObjC] Remove the leading 'l_' from ObjC symbols and make private symbols in the __DATA segment internal.

2019-05-02 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak marked an inline comment as done. ahatanak added inline comments. Comment at: lib/CodeGen/CGObjCMac.cpp:3961 + // linkage so that the linker preserves the symbol name. + llvm::GlobalValue::LinkageTypes LT = ExplicitDataSegment || Section.empty() +

[PATCH] D61454: [CodeGen][ObjC] Remove the leading 'l_' from ObjC symbols and make private symbols in the __DATA segment internal.

2019-05-02 Thread Vedant Kumar via Phabricator via cfe-commits
vsk added inline comments. Comment at: lib/CodeGen/CGObjCMac.cpp:3961 + // linkage so that the linker preserves the symbol name. + llvm::GlobalValue::LinkageTypes LT = ExplicitDataSegment || Section.empty() + ? llvm::GlobalValue::Intern

[PATCH] D61454: [CodeGen][ObjC] Remove the leading 'l_' from ObjC symbols and make private symbols in the __DATA segment internal.

2019-05-02 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak updated this revision to Diff 197877. ahatanak marked 6 inline comments as done. ahatanak edited the summary of this revision. ahatanak added a comment. Address review comments. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61454/new/ https://reviews.llv

[PATCH] D61454: [CodeGen][ObjC] Remove the leading 'l_' from ObjC symbols and make private symbols in the __DATA segment internal.

2019-05-02 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added inline comments. Comment at: lib/CodeGen/CGObjCMac.cpp:1978 +? llvm::GlobalVariable::InternalLinkage +: llvm::GlobalValue::PrivateLinkage); // FIXME. Fix section. rj

[PATCH] D61454: [CodeGen][ObjC] Remove the leading 'l_' from ObjC symbols and make private symbols in the __DATA segment internal.

2019-05-02 Thread Vedant Kumar via Phabricator via cfe-commits
vsk added a comment. Thanks for working on this! Comment at: lib/CodeGen/CGObjCMac.cpp:1983 + else +GV->setSection("__OBJC,__cstring_object,regular,no_dead_strip"); + Are constant NSStrings within the shared cache ever dirtied? I was under the impression

[PATCH] D61454: [CodeGen][ObjC] Remove the leading 'l_' from ObjC symbols and make private symbols in the __DATA segment internal.

2019-05-02 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: lib/CodeGen/CGObjCMac.cpp:1024 + bool AddToUsed, + bool ExplicitDataSegment); llvm::GlobalVariable *CreateMetadataVar(Twine Name, Plea

[PATCH] D61454: [CodeGen][ObjC] Remove the leading 'l_' from ObjC symbols and make private symbols in the __DATA segment internal.

2019-05-02 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak created this revision. ahatanak added reviewers: rjmccall, vsk. ahatanak added a project: clang. Herald added subscribers: dexonsmith, jkorous. This change is a continuation of https://reviews.llvm.org/D59234 and makes the symbols within __DATA visible. rdar://problem/48887111 Reposit