forked from OSchip/llvm-project
Remove getElfArchType from ELF.h. It's only used in ELFObjectFile.cpp and there's already a copy there. ELF.h was hiding the one there and causing an unused function warning.
llvm-svn: 154657
This commit is contained in:
parent
822698412b
commit
bc6bc81449
|
@ -33,15 +33,6 @@
|
||||||
namespace llvm {
|
namespace llvm {
|
||||||
namespace object {
|
namespace object {
|
||||||
|
|
||||||
// Subclasses of ELFObjectFile may need this for template instantiation
|
|
||||||
inline std::pair<unsigned char, unsigned char>
|
|
||||||
getElfArchType(MemoryBuffer *Object) {
|
|
||||||
if (Object->getBufferSize() < ELF::EI_NIDENT)
|
|
||||||
return std::make_pair((uint8_t)ELF::ELFCLASSNONE,(uint8_t)ELF::ELFDATANONE);
|
|
||||||
return std::make_pair( (uint8_t)Object->getBufferStart()[ELF::EI_CLASS]
|
|
||||||
, (uint8_t)Object->getBufferStart()[ELF::EI_DATA]);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Templates to choose Elf_Addr and Elf_Off depending on is64Bits.
|
// Templates to choose Elf_Addr and Elf_Off depending on is64Bits.
|
||||||
template<support::endianness target_endianness>
|
template<support::endianness target_endianness>
|
||||||
struct ELFDataTypeTypedefHelperCommon {
|
struct ELFDataTypeTypedefHelperCommon {
|
||||||
|
|
Loading…
Reference in New Issue