1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 03:23:01 +02:00

Remove a bit of dead code.

Every "real" object file implements this an ptx doesn't use it.

llvm-svn: 221746
This commit is contained in:
Rafael Espindola 2014-11-12 01:27:22 +00:00
parent 3f28d75529
commit 76e71e8707
4 changed files with 11 additions and 20 deletions

View File

@ -160,7 +160,7 @@ public:
protected:
virtual const MCSection *
SelectSectionForGlobal(const GlobalValue *GV, SectionKind Kind,
Mangler &Mang, const TargetMachine &TM) const;
Mangler &Mang, const TargetMachine &TM) const = 0;
};
} // end namespace llvm

View File

@ -4496,3 +4496,10 @@ NVPTXTargetObjectFile::~NVPTXTargetObjectFile() {
delete DwarfRangesSection;
delete DwarfMacroInfoSection;
}
const MCSection *
NVPTXTargetObjectFile::SelectSectionForGlobal(const GlobalValue *GV,
SectionKind Kind, Mangler &Mang,
const TargetMachine &TM) const {
return getDataSection();
}

View File

@ -98,6 +98,9 @@ public:
return DataSection;
}
const MCSection *
SelectSectionForGlobal(const GlobalValue *GV, SectionKind Kind, Mangler &Mang,
const TargetMachine &TM) const override;
};
} // end namespace llvm

View File

@ -275,25 +275,6 @@ bool TargetLoweringObjectFile::isSectionAtomizableBySymbols(
return false;
}
// Lame default implementation. Calculate the section name for global.
const MCSection *
TargetLoweringObjectFile::SelectSectionForGlobal(const GlobalValue *GV,
SectionKind Kind,
Mangler &Mang,
const TargetMachine &TM) const{
assert(!Kind.isThreadLocal() && "Doesn't support TLS");
if (Kind.isText())
return getTextSection();
if (Kind.isBSS() && BSSSection != nullptr)
return BSSSection;
if (Kind.isReadOnly() && ReadOnlySection != nullptr)
return ReadOnlySection;
return getDataSection();
}
/// getSectionForConstant - Given a mergable constant with the
/// specified size and relocation information, return a section that it