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
This commit is contained in:
David Majnemer
2014-06-27 17:19:44 +00:00
parent 6d557f37cf
commit d7d427732e
4 changed files with 28 additions and 9 deletions

View File

@@ -22,6 +22,7 @@
#include "llvm/Support/Compiler.h"
#include "llvm/Support/raw_ostream.h"
#include <map>
#include <tuple>
#include <vector> // FIXME: Shouldn't be needed.
namespace llvm {
@@ -160,10 +161,11 @@ namespace llvm {
unsigned DwarfCompileUnitID;
typedef std::pair<std::string, std::string> SectionGroupPair;
typedef std::tuple<std::string, std::string, int> SectionGroupTriple;
StringMap<const MCSectionMachO*> MachOUniquingMap;
std::map<SectionGroupPair, const MCSectionELF *> ELFUniquingMap;
std::map<SectionGroupPair, const MCSectionCOFF *> COFFUniquingMap;
std::map<SectionGroupTriple, const MCSectionCOFF *> COFFUniquingMap;
/// Do automatic reset in destructor
bool AutoReset;