diff options
author | Chandler Carruth <chandlerc@gmail.com> | 2015-02-13 07:52:39 +0000 |
---|---|---|
committer | Chandler Carruth <chandlerc@gmail.com> | 2015-02-13 07:52:39 +0000 |
commit | d99f427e31377e93cf40690cb521850a2b755233 (patch) | |
tree | 8d9813019fc24462da325057a31918e06c2f0a99 /llvm/lib/MC/MCContext.cpp | |
parent | 191b57478e2bdb46d2c2155ba3e3fe19f2e5d731 (diff) | |
download | bcm5719-llvm-d99f427e31377e93cf40690cb521850a2b755233.tar.gz bcm5719-llvm-d99f427e31377e93cf40690cb521850a2b755233.zip |
Revert a series of commits starting at r228886 which is triggering some
regressions for LLDB on Linux. Rafael indicated on lldb-dev that we
should just go ahead and revert these but that he wasn't at a computer.
The patches backed out are as follows:
r228980: Add support for having multiple sections with the name and ...
r228889: Invert the section relocation map.
r228888: Use the existing SymbolTableIndex intsead of doing a lookup.
r228886: Create the Section -> Rel Section map when it is first needed.
These patches look pretty nice to me, so hoping its not too hard to get
them re-instated. =D
llvm-svn: 229080
Diffstat (limited to 'llvm/lib/MC/MCContext.cpp')
-rw-r--r-- | llvm/lib/MC/MCContext.cpp | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/llvm/lib/MC/MCContext.cpp b/llvm/lib/MC/MCContext.cpp index 721edd451ee..35609893e28 100644 --- a/llvm/lib/MC/MCContext.cpp +++ b/llvm/lib/MC/MCContext.cpp @@ -272,13 +272,12 @@ void MCContext::renameELFSection(const MCSectionELF *Section, StringRef Name) { const MCSectionELF *MCContext::getELFSection(StringRef Section, unsigned Type, unsigned Flags, unsigned EntrySize, - StringRef Group, bool Unique) { + StringRef Group) { // Do the lookup, if we have a hit, return it. auto IterBool = ELFUniquingMap.insert( std::make_pair(SectionGroupPair(Section, Group), nullptr)); auto &Entry = *IterBool.first; - if (!IterBool.second && !Unique) - return Entry.second; + if (!IterBool.second) return Entry.second; MCSymbol *GroupSym = nullptr; if (!Group.empty()) @@ -293,22 +292,15 @@ const MCSectionELF *MCContext::getELFSection(StringRef Section, unsigned Type, Kind = SectionKind::getReadOnly(); MCSectionELF *Result = new (*this) - MCSectionELF(CachedName, Type, Flags, Kind, EntrySize, GroupSym, Unique); - if (!Unique) - Entry.second = Result; + MCSectionELF(CachedName, Type, Flags, Kind, EntrySize, GroupSym); + Entry.second = Result; return Result; } -const MCSectionELF *MCContext::getELFSection(StringRef Section, unsigned Type, - unsigned Flags, unsigned EntrySize, - StringRef Group) { - return getELFSection(Section, Type, Flags, EntrySize, Group, false); -} - const MCSectionELF *MCContext::CreateELFGroupSection() { MCSectionELF *Result = - new (*this) MCSectionELF(".group", ELF::SHT_GROUP, 0, - SectionKind::getReadOnly(), 4, nullptr, false); + new (*this) MCSectionELF(".group", ELF::SHT_GROUP, 0, + SectionKind::getReadOnly(), 4, nullptr); return Result; } |