IR: Don't allow non-default visibility on local linkage
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>
Wed, 7 May 2014 22:57:20 +0000 (22:57 +0000)
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>
Wed, 7 May 2014 22:57:20 +0000 (22:57 +0000)
commit76c17d324ca877420e4be98638ef15a62b2efa4e
tree85e8ac4d8dd476be62d4f3dc212c8d6c7b29c043
parentc7e175a743babd383384aa3ca870f2406a8861da
IR: Don't allow non-default visibility on local linkage

Visibilities of `hidden` and `protected` are meaningless for symbols
with local linkage.

  - Change the assembler to reject non-default visibility on symbols
    with local linkage.

  - Change the bitcode reader to auto-upgrade `hidden` and `protected`
    to `default` when the linkage is local.

  - Update LangRef.

<rdar://problem/16141113>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208263 91177308-0d34-0410-b5e6-96231b3b80d8
23 files changed:
docs/LangRef.rst
lib/AsmParser/LLParser.cpp
lib/Bitcode/Reader/BitcodeReader.cpp
test/Assembler/internal-hidden-alias.ll [new file with mode: 0644]
test/Assembler/internal-hidden-function.ll [new file with mode: 0644]
test/Assembler/internal-hidden-variable.ll [new file with mode: 0644]
test/Assembler/internal-protected-alias.ll [new file with mode: 0644]
test/Assembler/internal-protected-function.ll [new file with mode: 0644]
test/Assembler/internal-protected-variable.ll [new file with mode: 0644]
test/Assembler/private-hidden-alias.ll [new file with mode: 0644]
test/Assembler/private-hidden-function.ll [new file with mode: 0644]
test/Assembler/private-hidden-variable.ll [new file with mode: 0644]
test/Assembler/private-protected-alias.ll [new file with mode: 0644]
test/Assembler/private-protected-function.ll [new file with mode: 0644]
test/Assembler/private-protected-variable.ll [new file with mode: 0644]
test/Bitcode/local-linkage-default-visibility.3.4.ll [new file with mode: 0644]
test/Bitcode/local-linkage-default-visibility.3.4.ll.bc [new file with mode: 0644]
test/LTO/keep-used-puts-during-instcombine.ll
test/Transforms/GlobalOpt/alias-used-section.ll
test/Transforms/GlobalOpt/atexit.ll
test/Transforms/MergeFunc/crash.ll
test/Transforms/MergeFunc/inttoptr-address-space.ll
test/Transforms/MergeFunc/inttoptr.ll