Initial comdat implementation.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118805 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Rafael Espindola
2010-11-11 18:13:52 +00:00
parent 56653f0df8
commit 2ff9e83a82
8 changed files with 213 additions and 38 deletions

View File

@ -18,6 +18,8 @@
namespace llvm {
class MCSymbol;
/// MCSectionELF - This represents a section on linux, lots of unix variants
/// and some bare metal systems.
class MCSectionELF : public MCSection {
@ -37,12 +39,14 @@ class MCSectionELF : public MCSection {
/// section does not contain fixed-sized entries 'EntrySize' will be 0.
unsigned EntrySize;
const MCSymbol *Group;
private:
friend class MCContext;
MCSectionELF(StringRef Section, unsigned type, unsigned flags,
SectionKind K, unsigned entrySize)
SectionKind K, unsigned entrySize, const MCSymbol *group)
: MCSection(SV_ELF, K), SectionName(Section), Type(type), Flags(flags),
EntrySize(entrySize) {}
EntrySize(entrySize), Group(group) {}
~MCSectionELF();
public:
@ -179,6 +183,7 @@ public:
unsigned getType() const { return Type; }
unsigned getFlags() const { return Flags; }
unsigned getEntrySize() const { return EntrySize; }
const MCSymbol *getGroup() const { return Group; }
void PrintSwitchToSection(const MCAsmInfo &MAI,
raw_ostream &OS) const;