[llvm] r340906 - Revert r340904 "[llvm-mc] - Allow to set custom flags for debug sections."
George Rimar via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 29 02:04:52 PDT 2018
Author: grimar
Date: Wed Aug 29 02:04:52 2018
New Revision: 340906
URL: http://llvm.org/viewvc/llvm-project?rev=340906&view=rev
Log:
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
Removed:
llvm/trunk/test/MC/ELF/section-flags.s
Modified:
llvm/trunk/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
llvm/trunk/lib/MC/MCContext.cpp
Modified: llvm/trunk/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/TargetLoweringObjectFileImpl.cpp?rev=340906&r1=340905&r2=340906&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/TargetLoweringObjectFileImpl.cpp (original)
+++ llvm/trunk/lib/CodeGen/TargetLoweringObjectFileImpl.cpp Wed Aug 29 02:04:52 2018
@@ -424,9 +424,6 @@ static SectionKind getELFKindForNamedSec
Name.startswith(".llvm.linkonce.tb."))
return SectionKind::getThreadBSS();
- if (Name.startswith(".debug_"))
- return SectionKind::getMetadata();
-
return K;
}
Modified: llvm/trunk/lib/MC/MCContext.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCContext.cpp?rev=340906&r1=340905&r2=340906&view=diff
==============================================================================
--- llvm/trunk/lib/MC/MCContext.cpp (original)
+++ llvm/trunk/lib/MC/MCContext.cpp Wed Aug 29 02:04:52 2018
@@ -394,15 +394,6 @@ MCSectionELF *MCContext::getELFSection(c
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(c
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) {
Removed: llvm/trunk/test/MC/ELF/section-flags.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/ELF/section-flags.s?rev=340905&view=auto
==============================================================================
--- llvm/trunk/test/MC/ELF/section-flags.s (original)
+++ llvm/trunk/test/MC/ELF/section-flags.s (removed)
@@ -1,12 +0,0 @@
-# RUN: llvm-mc -triple x86_64-pc-linux-gnu %s -filetype=obj -o %t.o
-# RUN: llvm-readobj -s --elf-output-style=GNU %t.o | FileCheck %s
-
-## Check we are able to set the custom flag ('E') for debug sections.
-# CHECK: .debug_info {{.*}} E
-# CHECK: .debug_str {{.*}} EMS
-
-.section .debug_info,"e"
-nop
-
-.section .debug_str,"eMS", at progbits,1
-nop
More information about the llvm-commits
mailing list