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)
commit75fc09ddbad9e302b1b12fae894dde8de0809f53
treeb9ef85bd664ab3f45b9021f9c9aacb20f5b5d194
parent3349f89974279c21c7230384ee8bea7aea99f738
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

llvm-svn: 244752
llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
llvm/test/CodeGen/AArch64/global-merge-2.ll
llvm/test/CodeGen/AArch64/global-merge-3.ll
llvm/test/CodeGen/ARM/aliases.ll
llvm/test/CodeGen/ARM/global-merge-external.ll