Redo "Make global aliases have symbol size equal to their type"
authorJohn Brawn <john.brawn@arm.com>
Wed, 12 Aug 2015 15:05:39 +0000 (15:05 +0000)
committerJohn Brawn <john.brawn@arm.com>
Wed, 12 Aug 2015 15:05:39 +0000 (15:05 +0000)
commit1843d3de5db669bbed6a46b063ba34c061c41255
tree6c675a08c568affc988b90236fb6352f3cfedbb3
parent1a5ed7be24acd9035006af4de59bb78d190bd0cc
Redo "Make global aliases have symbol size equal to their type"

r242520 was reverted in r244313 as the expected behaviour of the alias
attribute in C is that the alias has the same size as the aliasee. However
we can re-introduce adding the size on the alias when the aliasee does not,
from a source code or object perspective, exist as a discrete entity. This
happens when the aliasee is not a symbol, or when that symbol is private.

Differential Revision: http://reviews.llvm.org/D11943

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244752 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/AsmPrinter/AsmPrinter.cpp
test/CodeGen/AArch64/global-merge-2.ll
test/CodeGen/AArch64/global-merge-3.ll
test/CodeGen/ARM/aliases.ll
test/CodeGen/ARM/global-merge-external.ll