summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorTimur Iskhodzhanov <timurrrr@google.com>2014-06-06 08:18:18 +0000
committerTimur Iskhodzhanov <timurrrr@google.com>2014-06-06 08:18:18 +0000
commit460cf8891b18efd8a76fa66ad297eea7892eb82a (patch)
treef7ae02d93e40200f252650526a915cb827396dde /llvm/lib
parent65e6467e693c2389d137f07f94ecc087e2894d25 (diff)
downloadbcm5719-llvm-460cf8891b18efd8a76fa66ad297eea7892eb82a.tar.gz
bcm5719-llvm-460cf8891b18efd8a76fa66ad297eea7892eb82a.zip
Revert r210298 'Correctly set the comdat symbol on COFF' as it asserts on Windows
llvm-svn: 210317
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/MC/WinCOFFObjectWriter.cpp15
1 files changed, 2 insertions, 13 deletions
diff --git a/llvm/lib/MC/WinCOFFObjectWriter.cpp b/llvm/lib/MC/WinCOFFObjectWriter.cpp
index c3fc61b2904..961cbc6a8f7 100644
--- a/llvm/lib/MC/WinCOFFObjectWriter.cpp
+++ b/llvm/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;
OpenPOWER on IntegriCloud