Move common symbol related information from MCSectionData to MCSymbol.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238583 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Rafael Espindola
2015-05-29 17:48:04 +00:00
parent 052a7becbe
commit 82fdcc0e7f
10 changed files with 73 additions and 76 deletions

View File

@ -373,13 +373,13 @@ void MachObjectWriter::WriteNlist(MachSymbolData &MSD,
Address = AliaseeInfo->StringIndex;
else if (Symbol->isDefined())
Address = getSymbolAddress(OrigSymbol, Layout);
else if (Data.isCommon()) {
else if (Symbol->isCommon()) {
// Common symbols are encoded with the size in the address
// field, and their alignment in the flags.
Address = Data.getCommonSize();
Address = Symbol->getCommonSize();
// Common alignment is packed into the 'desc' bits.
if (unsigned Align = Data.getCommonAlignment()) {
if (unsigned Align = Symbol->getCommonAlignment()) {
unsigned Log2Size = Log2_32(Align);
assert((1U << Log2Size) == Align && "Invalid 'common' alignment!");
if (Log2Size > 15)