diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2015-06-02 21:30:13 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2015-06-02 21:30:13 +0000 |
commit | 0ccf9b71f3559f55ef228520686ad3619f83c606 (patch) | |
tree | 4d8476d6711b5e985683f3864048adfb5b7f2652 /llvm/lib/MC | |
parent | 62431b1d71e20025129f260da0a15a2f55768cc9 (diff) | |
download | bcm5719-llvm-0ccf9b71f3559f55ef228520686ad3619f83c606.tar.gz bcm5719-llvm-0ccf9b71f3559f55ef228520686ad3619f83c606.zip |
Pass a MCSymbolELF to a few ELF only functions. NFC.
llvm-svn: 238868
Diffstat (limited to 'llvm/lib/MC')
-rw-r--r-- | llvm/lib/MC/ELFObjectWriter.cpp | 2 | ||||
-rw-r--r-- | llvm/lib/MC/MCContext.cpp | 10 |
2 files changed, 6 insertions, 6 deletions
diff --git a/llvm/lib/MC/ELFObjectWriter.cpp b/llvm/lib/MC/ELFObjectWriter.cpp index 7d15f17684e..d0bdfc15cde 100644 --- a/llvm/lib/MC/ELFObjectWriter.cpp +++ b/llvm/lib/MC/ELFObjectWriter.cpp @@ -1242,7 +1242,7 @@ void ELFObjectWriter::WriteObject(MCAssembler &Asm, // Remember the offset into the file for this section. uint64_t SecStart = OS.tell(); - const MCSymbol *SignatureSymbol = Section.getGroup(); + const MCSymbolELF *SignatureSymbol = Section.getGroup(); writeSectionData(Asm, Section, Layout); uint64_t SecEnd = OS.tell(); diff --git a/llvm/lib/MC/MCContext.cpp b/llvm/lib/MC/MCContext.cpp index 4bb39d3f883..8179e6c50ce 100644 --- a/llvm/lib/MC/MCContext.cpp +++ b/llvm/lib/MC/MCContext.cpp @@ -302,7 +302,7 @@ void MCContext::renameELFSection(MCSectionELF *Section, StringRef Name) { MCSectionELF *MCContext::createELFRelSection(StringRef Name, unsigned Type, unsigned Flags, unsigned EntrySize, - const MCSymbol *Group, + const MCSymbolELF *Group, const MCSectionELF *Associated) { StringMap<bool>::iterator I; bool Inserted; @@ -317,9 +317,9 @@ MCSectionELF *MCContext::getELFSection(StringRef Section, unsigned Type, unsigned Flags, unsigned EntrySize, StringRef Group, unsigned UniqueID, const char *BeginSymName) { - MCSymbol *GroupSym = nullptr; + MCSymbolELF *GroupSym = nullptr; if (!Group.empty()) - GroupSym = getOrCreateSymbol(Group); + GroupSym = cast<MCSymbolELF>(getOrCreateSymbol(Group)); return getELFSection(Section, Type, Flags, EntrySize, GroupSym, UniqueID, BeginSymName, nullptr); @@ -327,7 +327,7 @@ MCSectionELF *MCContext::getELFSection(StringRef Section, unsigned Type, MCSectionELF *MCContext::getELFSection(StringRef Section, unsigned Type, unsigned Flags, unsigned EntrySize, - const MCSymbol *GroupSym, + const MCSymbolELF *GroupSym, unsigned UniqueID, const char *BeginSymName, const MCSectionELF *Associated) { @@ -360,7 +360,7 @@ MCSectionELF *MCContext::getELFSection(StringRef Section, unsigned Type, return Result; } -MCSectionELF *MCContext::createELFGroupSection(const MCSymbol *Group) { +MCSectionELF *MCContext::createELFGroupSection(const MCSymbolELF *Group) { MCSectionELF *Result = new (*this) MCSectionELF(".group", ELF::SHT_GROUP, 0, SectionKind::getReadOnly(), 4, Group, ~0, nullptr, nullptr); |