[llvm] r207786 - Don't propagate StorageClass and ComplexType to aliases.
Rafael Espindola
rafael.espindola at gmail.com
Thu May 1 12:02:03 PDT 2014
Author: rafael
Date: Thu May 1 14:02:03 2014
New Revision: 207786
URL: http://llvm.org/viewvc/llvm-project?rev=207786&view=rev
Log:
Don't propagate StorageClass and ComplexType to aliases.
This matches gas' behaviour on COFF.
I think that this yak is now sufficiently shaved for aliases with offset
to work.
Modified:
llvm/trunk/lib/MC/WinCOFFObjectWriter.cpp
llvm/trunk/test/MC/COFF/alias.s
llvm/trunk/test/MC/COFF/symbol-alias.s
Modified: llvm/trunk/lib/MC/WinCOFFObjectWriter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/WinCOFFObjectWriter.cpp?rev=207786&r1=207785&r2=207786&view=diff
==============================================================================
--- llvm/trunk/lib/MC/WinCOFFObjectWriter.cpp (original)
+++ llvm/trunk/lib/MC/WinCOFFObjectWriter.cpp Thu May 1 14:02:03 2014
@@ -439,8 +439,7 @@ void WinCOFFObjectWriter::DefineSymbol(M
coff_symbol->MCData = &SymbolData;
} else {
- const MCSymbolData &ResSymData =
- Assembler.getSymbolData(Symbol.AliasedSymbol());
+ const MCSymbolData &ResSymData = Assembler.getSymbolData(Symbol);
const MCSymbol *Base = Layout.getBaseSymbol(Symbol);
coff_symbol->Data.Value = getSymbolValue(ResSymData, Layout);
Modified: llvm/trunk/test/MC/COFF/alias.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/COFF/alias.s?rev=207786&r1=207785&r2=207786&view=diff
==============================================================================
--- llvm/trunk/test/MC/COFF/alias.s (original)
+++ llvm/trunk/test/MC/COFF/alias.s Thu May 1 14:02:03 2014
@@ -68,7 +68,7 @@ weak_aliased_to_external = external2
// CHECK-NEXT: Section: .text (1)
// CHECK-NEXT: BaseType: Null (0x0)
// CHECK-NEXT: ComplexType: Null (0x0)
-// CHECK-NEXT: StorageClass: Static (0x3)
+// CHECK-NEXT: StorageClass: External (0x2)
// CHECK-NEXT: AuxSymbolCount: 0
// CHECK-NEXT: }
// CHECK-NEXT: Symbol {
Modified: llvm/trunk/test/MC/COFF/symbol-alias.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/COFF/symbol-alias.s?rev=207786&r1=207785&r2=207786&view=diff
==============================================================================
--- llvm/trunk/test/MC/COFF/symbol-alias.s (original)
+++ llvm/trunk/test/MC/COFF/symbol-alias.s Thu May 1 14:02:03 2014
@@ -51,7 +51,7 @@ _bar_alias = _bar
// CHECK-NEXT: Value: [[FOO_VALUE]]
// CHECK-NEXT: Section: [[FOO_SECTION_NUMBER]]
// CHECK-NEXT: BaseType: [[FOO_SIMPLE_TYPE]]
-// CHECK-NEXT: ComplexType: [[FOO_COMPLEX_TYPE]]
+// CHECK-NEXT: ComplexType: Null (0x0)
// CHECK-NEXT: StorageClass: [[FOO_STORAGE_CLASS]]
// CHECK-NEXT: AuxSymbolCount: [[FOO_NUMBER_OF_AUX_SYMBOLS]]
More information about the llvm-commits
mailing list