mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-29 10:25:12 +00:00
untangle a TargetAsmInfo hack where ELFTargetAsmInfo would create a
'unnamed' bss section, but some impls would want a named one. Since they don't have consistent behavior, just make each target do their own thing, instead of doing something "sortof common" then having targets change immutable objects later. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77165 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -389,12 +389,12 @@ TargetAsmInfo::getSectionForMergeableConstant(SectionKind Kind) const {
|
||||
}
|
||||
|
||||
|
||||
const Section *TargetAsmInfo::getNamedSection(const char *Name, unsigned Flags,
|
||||
bool Override) const {
|
||||
const Section *TargetAsmInfo::getNamedSection(const char *Name,
|
||||
unsigned Flags) const {
|
||||
Section &S = Sections[Name];
|
||||
|
||||
// This is newly-created section, set it up properly.
|
||||
if (S.Flags == SectionFlags::Invalid || Override) {
|
||||
if (S.Name.empty()) {
|
||||
S.Flags = Flags | SectionFlags::Named;
|
||||
S.Name = Name;
|
||||
}
|
||||
@@ -403,12 +403,11 @@ const Section *TargetAsmInfo::getNamedSection(const char *Name, unsigned Flags,
|
||||
}
|
||||
|
||||
const Section*
|
||||
TargetAsmInfo::getUnnamedSection(const char *Directive, unsigned Flags,
|
||||
bool Override) const {
|
||||
TargetAsmInfo::getUnnamedSection(const char *Directive, unsigned Flags) const {
|
||||
Section& S = Sections[Directive];
|
||||
|
||||
// This is newly-created section, set it up properly.
|
||||
if (S.Flags == SectionFlags::Invalid || Override) {
|
||||
if (S.Name.empty()) {
|
||||
S.Flags = Flags & ~SectionFlags::Named;
|
||||
S.Name = Directive;
|
||||
}
|
||||
|
Reference in New Issue
Block a user