summaryrefslogtreecommitdiffstats
path: root/llvm/lib/AsmParser/LLParser.cpp
diff options
context:
space:
mode:
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>2014-05-07 22:53:14 +0000
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>2014-05-07 22:53:14 +0000
commit87121f84d2fd0f3cfb6c6f7c99aeb7d22c665b74 (patch)
tree7607caeca0f6b9ce85da44f9c3080e42687fc2fa /llvm/lib/AsmParser/LLParser.cpp
parent60cdff65c78f3df5fe5871ac1af3e6a8a2be8ecd (diff)
downloadbcm5719-llvm-87121f84d2fd0f3cfb6c6f7c99aeb7d22c665b74.tar.gz
bcm5719-llvm-87121f84d2fd0f3cfb6c6f7c99aeb7d22c665b74.zip
LTO: Check local linkage first
Since visibility is meaningless for symbols with local linkage, check local linkage before visibility when setting symbol attributes. When linkage is `internal` and the visibility is `hidden`, the exposed attribute is now `LTO_SYMBOL_SCOPE_INTERNAL` instead of `LTO_SYMBOL_SCOPE_HIDDEN`. Although the bitfield allows *both* to be specified, the combination is nonsense anyway. Given changes (in progress) to drop visibility when a symbol has local linkage, this almost has no functionality change: it's mostly a cleanup to clarify the logic. The exception is when something has `appending` linkage. Before this change, such symbols would be advertised as `LTO_SYMBOL_SCOPE_INTERNAL`; now, they'll be given `LTO_SYMBOL_SCOPE_COMMON`. Unfortunately this is really awkward to test. This only changes what we advertise to linkers (before running LTO), not what the final object looks like. In theory I could add `DEBUG` output to `llvm-lto` (and test with "REQUIRES: asserts"), but follow-up commits to disallow `internal hidden` simplify this anyway. <rdar://problem/16141113> llvm-svn: 208261
Diffstat (limited to 'llvm/lib/AsmParser/LLParser.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud