mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-13 09:33:50 +00:00
simplify this code now that SectionKind knows if a global is weak or not.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77141 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
4c50922f6b
commit
2b421dad78
@ -129,15 +129,12 @@ DarwinTargetAsmInfo::SelectSectionForGlobal(const GlobalValue *GV,
|
||||
SectionKind Kind) const {
|
||||
assert(!Kind.isThreadLocal() && "Darwin doesn't support TLS");
|
||||
|
||||
// FIXME: Use sectionflags:linkonce instead of isWeakForLinker() here.
|
||||
bool isWeak = GV->isWeakForLinker();
|
||||
|
||||
if (Kind.isText())
|
||||
return isWeak ? TextCoalSection : TextSection;
|
||||
return Kind.isWeak() ? TextCoalSection : TextSection;
|
||||
|
||||
// If this is weak/linkonce, put this in a coalescable section, either in text
|
||||
// or data depending on if it is writable.
|
||||
if (isWeak) {
|
||||
if (Kind.isWeak()) {
|
||||
if (Kind.isReadOnly())
|
||||
return ConstTextCoalSection;
|
||||
return DataCoalSection;
|
||||
|
Loading…
x
Reference in New Issue
Block a user