diff options
author | Timur Iskhodzhanov <timurrrr@google.com> | 2014-06-06 08:18:18 +0000 |
---|---|---|
committer | Timur Iskhodzhanov <timurrrr@google.com> | 2014-06-06 08:18:18 +0000 |
commit | 3ad10cfab874dcb1eac8a7d7f54447c2c8a3b862 (patch) | |
tree | 5c374d43276dac64fcd6ab76c9fb7c2f225c0a6b /lib/MC | |
parent | 3c9a2ee891cad60e8fd9ffe72c95b9ade3ece270 (diff) | |
download | llvm-3ad10cfab874dcb1eac8a7d7f54447c2c8a3b862.tar.gz llvm-3ad10cfab874dcb1eac8a7d7f54447c2c8a3b862.tar.bz2 llvm-3ad10cfab874dcb1eac8a7d7f54447c2c8a3b862.tar.xz |
Revert r210298 'Correctly set the comdat symbol on COFF' as it asserts on Windows
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210317 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/MC')
-rw-r--r-- | lib/MC/WinCOFFObjectWriter.cpp | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/lib/MC/WinCOFFObjectWriter.cpp b/lib/MC/WinCOFFObjectWriter.cpp index c3fc61b290..961cbc6a8f 100644 --- a/lib/MC/WinCOFFObjectWriter.cpp +++ b/lib/MC/WinCOFFObjectWriter.cpp @@ -347,11 +347,6 @@ void WinCOFFObjectWriter::DefineSection(MCSectionData const &SectionData) { COFFSection *coff_section = createSection(Sec.getSectionName()); COFFSymbol *coff_symbol = createSymbol(Sec.getSectionName()); - if (const MCSymbol *S = Sec.getCOMDATSymbol()) { - COFFSymbol *COMDATSymbol = GetOrCreateCOFFSymbol(S); - assert(!COMDATSymbol->Section); - COMDATSymbol->Section = coff_section; - } coff_section->Symbol = coff_symbol; coff_symbol->Section = coff_section; @@ -463,15 +458,9 @@ void WinCOFFObjectWriter::DefineSymbol(MCSymbolData const &SymbolData, coff_symbol->Data.SectionNumber = COFF::IMAGE_SYM_ABSOLUTE; } else { const MCSymbolData &BaseData = Assembler.getSymbolData(*Base); - if (BaseData.Fragment) { - COFFSection *Sec = + if (BaseData.Fragment) + coff_symbol->Section = SectionMap[&BaseData.Fragment->getParent()->getSection()]; - - if (coff_symbol->Section && coff_symbol->Section != Sec) - report_fatal_error("conflicting sections for symbol"); - - coff_symbol->Section = Sec; - } } coff_symbol->MCData = &ResSymData; |