mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-07 14:33:15 +00:00
tidy up
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76975 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
27f3065cf3
commit
e5ca0ac36b
@ -251,10 +251,10 @@ static unsigned GetSectionFlagsForNamedELFSection(const char *Name) {
|
||||
SectionKind::Kind
|
||||
TargetAsmInfo::SectionKindForGlobal(const GlobalValue *GV) const {
|
||||
// Early exit - functions should be always in text sections.
|
||||
if (isa<Function>(GV))
|
||||
const GlobalVariable *GVar = dyn_cast<GlobalVariable>(GV);
|
||||
if (GVar == 0)
|
||||
return SectionKind::Text;
|
||||
|
||||
const GlobalVariable* GVar = dyn_cast<GlobalVariable>(GV);
|
||||
bool isThreadLocal = GVar->isThreadLocal();
|
||||
assert(GVar && "Invalid global value for section selection");
|
||||
|
||||
@ -308,9 +308,10 @@ const Section *TargetAsmInfo::SectionForGlobal(const GlobalValue *GV) const {
|
||||
if (GV->isWeakForLinker()) {
|
||||
if (const char *Prefix =
|
||||
getSectionPrefixForUniqueGlobal(SectionKindForGlobal(GV))) {
|
||||
unsigned Flags = SectionFlagsForGlobal(GV, SectionKindForGlobal(GV));
|
||||
|
||||
// FIXME: Use mangler interface (PR4584).
|
||||
std::string Name = Prefix+GV->getNameStr();
|
||||
unsigned Flags = SectionFlagsForGlobal(GV, SectionKindForGlobal(GV));
|
||||
return getNamedSection(Name.c_str(), Flags);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user