llvm-project/llvm/utils
Rafael Espindola 2fb5bc33a3 Remove the linker_private and linker_private_weak linkages.
These linkages were introduced some time ago, but it was never very
clear what exactly their semantics were or what they should be used
for. Some investigation found these uses:

* utf-16 strings in clang.
* non-unnamed_addr strings produced by the sanitizers.

It turns out they were just working around a more fundamental problem.
For some sections a MachO linker needs a symbol in order to split the
section into atoms, and llvm had no idea that was the case. I fixed
that in r201700 and it is now safe to use the private linkage. When
the object ends up in a section that requires symbols, llvm will use a
'l' prefix instead of a 'L' prefix and things just work.

With that, these linkages were already dead, but there was a potential
future user in the objc metadata information. I am still looking at
CGObjcMac.cpp, but at this point I am convinced that linker_private
and linker_private_weak are not what they need.

The objc uses are currently split in

* Regular symbols (no '\01' prefix). LLVM already directly provides
whatever semantics they need.
* Uses of a private name (start with "\01L" or "\01l") and private
linkage. We can drop the "\01L" and "\01l" prefixes as soon as llvm
agrees with clang on L being ok or not for a given section. I have two
patches in code review for this.
* Uses of private name and weak linkage.

The last case is the one that one could think would fit one of these
linkages. That is not the case. The semantics are

* the linker will merge these symbol by *name*.
* the linker will hide them in the final DSO.

Given that the merging is done by name, any of the private (or
internal) linkages would be a bad match. They allow llvm to rename the
symbols, and that is really not what we want. From the llvm point of
view, these objects should really be (linkonce|weak)(_odr)?.

For now, just keeping the "\01l" prefix is probably the best for these
symbols. If we one day want to have a more direct support in llvm,
IMHO what we should add is not a linkage, it is just a hidden_symbol
attribute. It would be applicable to multiple linkages. For example,
on weak it would produce the current behavior we have for objc
metadata. On internal, it would be equivalent to private (and we
should then remove private).

llvm-svn: 203866
2014-03-13 23:18:37 +00:00
..
FileCheck Replace OwningPtr<T> with std::unique_ptr<T>. 2014-03-06 05:51:42 +00:00
FileUpdate Replace OwningPtr<T> with std::unique_ptr<T>. 2014-03-06 05:51:42 +00:00
KillTheDoctor Fix grammar-o. 2012-12-11 00:23:07 +00:00
Misc Patch that forces MergeFunctions pass for clang. 2013-09-24 20:06:31 +00:00
PerfectShuffle Sort the #include lines for utils/... 2012-12-04 10:37:14 +00:00
TableGen [TableGen] Optionally forbid overlap between named and positional operands 2014-03-13 07:57:54 +00:00
Target/ARM
bugpoint
buildit Darwin builds: handle different possible form for SDKROOT. 2014-02-18 11:20:44 +00:00
count Install three utils, "FileCheck", "count", and "not", for now to appease llvmlab dragonegg builder. 2013-12-20 06:25:37 +00:00
crosstool
emacs Add addrspacecast instruction. 2013-11-15 01:34:59 +00:00
fpcmp Don't use PathV1.h in FileUtilities.h. 2013-06-13 20:41:00 +00:00
git [utils] Update find-rev utility to take a branch argument (name of the git-svn 2013-01-17 18:57:21 +00:00
git-svn Use 'git svn find-rev' in git-svnrevert instead of shell script fu. 2013-04-26 03:27:39 +00:00
jedit
kate Remove the linker_private and linker_private_weak linkages. 2014-03-13 23:18:37 +00:00
lint
lit [lit] Fix non-function style print statement. 2014-03-11 14:05:49 +00:00
llvm-build llvmbuild: Exclude disabled targets from LLVMExports.cmake. 2014-02-16 12:14:24 +00:00
llvm-lit Add the lld root to llvm-lit, so llvm-lit can be used 2014-01-14 22:52:24 +00:00
not [CMake] LLVMSupport should be responsible to provide system_libs. 2014-02-10 10:52:19 +00:00
release Remove superfluous label. 2013-12-03 07:34:19 +00:00
testgen [MC] bundle alignment: prevent padding instructions from crossing bundle boundaries 2013-01-31 17:00:03 +00:00
textmate Add highlighting for "int" keyword 2013-01-08 16:23:02 +00:00
unittest [CMake] Use LINK_LIBS instead of target_link_libraries(). 2014-02-26 06:41:29 +00:00
valgrind llvm/utils/valgrind/x86_64-pc-linux-gnu.supp: Add /usr/bin/cmp. 2013-01-20 15:30:29 +00:00
vim Remove the linker_private and linker_private_weak linkages. 2014-03-13 23:18:37 +00:00
yaml-bench Replace OwningPtr<T> with std::unique_ptr<T>. 2014-03-06 05:51:42 +00:00
DSAclean.py
DSAextract.py
GenLibDeps.pl Rename VMCore directory to IR. 2013-01-02 09:10:48 +00:00
GetRepositoryPath Fix the build for git repositories with multiple remotes. 2013-09-16 09:25:49 +00:00
GetSourceVersion
LLVMBuild.txt
Makefile Move yaml2obj to tools too. 2013-04-05 20:00:35 +00:00
UpdateCMakeLists.pl Generalize matching of add_executable to add_XXX_executable. 2012-11-22 07:48:52 +00:00
check-each-file
clang-parse-diagnostics-file [utils] Tweak utils/clang-parse-diagnostics-file to ignore autoconf diagnostics. 2012-12-22 00:47:06 +00:00
codegen-diff
countloc.sh
findmisopt
findoptdiff
findsym.pl
getsrcs.sh
lldbDataFormatters.py Simplify the SmallVector pretty printer for LLDB a bit and make it work with reference types. 2012-11-10 09:45:32 +00:00
llvm-compilers-check Avoid Unnecessary Builds 2013-01-28 22:05:50 +00:00
llvm-native-gxx
llvm.grm Remove the linker_private and linker_private_weak linkages. 2014-03-13 23:18:37 +00:00
llvm.natvis Adding support for MSVC debugger visualization of the Optional datatype. 2014-03-03 21:15:07 +00:00
llvmdo
llvmgrep
makellvm
sort_includes.py Teach sort_includes.py to drop duplicated includes. 2012-12-21 18:00:08 +00:00
test_debuginfo.pl test_debuginfo.pl: Make failures easier to debug by printing the debugger 2014-02-20 19:55:44 +00:00
wciia.py Fix known typos 2014-01-24 17:20:08 +00:00