diff options
author | David Majnemer <david.majnemer@gmail.com> | 2014-06-27 17:19:44 +0000 |
---|---|---|
committer | David Majnemer <david.majnemer@gmail.com> | 2014-06-27 17:19:44 +0000 |
commit | d7d427732e3e7f571bc915c15974e184733bbd01 (patch) | |
tree | fdd6a57bf418275b890e8c43fc3cc38e5d71fcf1 /lib/MC/MCParser/COFFAsmParser.cpp | |
parent | 6d557f37cf463fb19f34b8eacd98ef5b6da4aa4b (diff) | |
download | llvm-d7d427732e3e7f571bc915c15974e184733bbd01.tar.gz llvm-d7d427732e3e7f571bc915c15974e184733bbd01.tar.bz2 llvm-d7d427732e3e7f571bc915c15974e184733bbd01.tar.xz |
MC: Fix associative sections on COFF
COFF sections in MC were represented by a tuple of section-name and
COMDAT-name. This is not sufficient to represent a .text section
associated with another .text section; we need a way to distinguish
between the key section and the one marked associative.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211913 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/MC/MCParser/COFFAsmParser.cpp')
-rw-r--r-- | lib/MC/MCParser/COFFAsmParser.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/MC/MCParser/COFFAsmParser.cpp b/lib/MC/MCParser/COFFAsmParser.cpp index 0d914efe87..146889599e 100644 --- a/lib/MC/MCParser/COFFAsmParser.cpp +++ b/lib/MC/MCParser/COFFAsmParser.cpp @@ -292,8 +292,7 @@ bool COFFAsmParser::ParseDirectiveSymbolAttribute(StringRef Directive, SMLoc) { bool COFFAsmParser::ParseSectionSwitch(StringRef Section, unsigned Characteristics, SectionKind Kind) { - return ParseSectionSwitch(Section, Characteristics, Kind, "", - COFF::IMAGE_COMDAT_SELECT_ANY); + return ParseSectionSwitch(Section, Characteristics, Kind, "", (COFF::COMDATType)0); } bool COFFAsmParser::ParseSectionSwitch(StringRef Section, @@ -357,9 +356,10 @@ bool COFFAsmParser::ParseDirectiveSection(StringRef, SMLoc) { return true; } - COFF::COMDATType Type = COFF::IMAGE_COMDAT_SELECT_ANY; + COFF::COMDATType Type = (COFF::COMDATType)0; StringRef COMDATSymName; if (getLexer().is(AsmToken::Comma)) { + Type = COFF::IMAGE_COMDAT_SELECT_ANY;; Lex(); Flags |= COFF::IMAGE_SCN_LNK_COMDAT; |