diff options
author | George Rimar <grimar@accesssoftek.com> | 2018-08-29 09:04:52 +0000 |
---|---|---|
committer | George Rimar <grimar@accesssoftek.com> | 2018-08-29 09:04:52 +0000 |
commit | 9fbecc97ae8d94465e496cff6e0d13f576dbe681 (patch) | |
tree | 469dcced24dd91965151597553d1ec8cc941ad37 /llvm/lib/MC/MCContext.cpp | |
parent | b3caadf5f405d82ad9dbd94a35c5c375afd83ece (diff) | |
download | bcm5719-llvm-9fbecc97ae8d94465e496cff6e0d13f576dbe681.tar.gz bcm5719-llvm-9fbecc97ae8d94465e496cff6e0d13f576dbe681.zip |
Revert r340904 "[llvm-mc] - Allow to set custom flags for debug sections."
It broke PPC64 BB:
http://lab.llvm.org:8011/builders/clang-ppc64be-linux/builds/23252
llvm-svn: 340906
Diffstat (limited to 'llvm/lib/MC/MCContext.cpp')
-rw-r--r-- | llvm/lib/MC/MCContext.cpp | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/llvm/lib/MC/MCContext.cpp b/llvm/lib/MC/MCContext.cpp index ef919d00923..341a1a4e3b4 100644 --- a/llvm/lib/MC/MCContext.cpp +++ b/llvm/lib/MC/MCContext.cpp @@ -394,15 +394,6 @@ MCSectionELF *MCContext::getELFSection(const Twine &Section, unsigned Type, auto IterBool = ELFUniquingMap.insert( std::make_pair(ELFSectionKey{Section.str(), Group, UniqueID}, nullptr)); auto &Entry = *IterBool.first; - MCSectionELF *&Sec = Entry.second; - if (!IterBool.second) { - // We want to let users add additional flags even for sections with - // defaults. For example, .debug_str has "MS" flags by default and user - // might want to add "E". - Sec->setFlags(Sec->getFlags() | Flags); - return Sec; - } - if (!IterBool.second) return Entry.second; @@ -416,9 +407,10 @@ MCSectionELF *MCContext::getELFSection(const Twine &Section, unsigned Type, else Kind = SectionKind::getReadOnly(); - Sec = createELFSectionImpl(CachedName, Type, Flags, Kind, EntrySize, GroupSym, - UniqueID, Associated); - return Sec; + MCSectionELF *Result = createELFSectionImpl( + CachedName, Type, Flags, Kind, EntrySize, GroupSym, UniqueID, Associated); + Entry.second = Result; + return Result; } MCSectionELF *MCContext::createELFGroupSection(const MCSymbolELF *Group) { |