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

Saleem Abdulrasool via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri May 3 00:00:59 PDT 2019


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 metadata variable not in the `__DATA` segment?


================
Comment at: lib/CodeGen/CGObjCMac.cpp:7266
+                                     false,
+                                     CGM.getTriple().isOSBinFormatMachO()
+                                         ? llvm::GlobalValue::InternalLinkage
----------------
Is there a reason to not make this and the other instances `Internal` irrespective of the object file format?


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