mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-01-06 08:02:18 +00:00
Make a function out-of-line.
There's no need to write it in a .h file. llvm-svn: 253633
This commit is contained in:
parent
2dc3f8c278
commit
2022e81af0
@ -35,6 +35,14 @@ template <class ELFT>
|
||||
ELFFileBase<ELFT>::ELFFileBase(Kind K, MemoryBufferRef M)
|
||||
: InputFile(K, M), ELFObj(MB.getBuffer(), ECRAII().getEC()) {}
|
||||
|
||||
template <class ELFT>
|
||||
ELFKind ELFFileBase<ELFT>::getELFKind() {
|
||||
using llvm::support::little;
|
||||
if (ELFT::Is64Bits)
|
||||
return ELFT::TargetEndianness == little ? ELF64LEKind : ELF64BEKind;
|
||||
return ELFT::TargetEndianness == little ? ELF32LEKind : ELF32BEKind;
|
||||
}
|
||||
|
||||
template <class ELFT>
|
||||
typename ELFFileBase<ELFT>::Elf_Sym_Range
|
||||
ELFFileBase<ELFT>::getSymbolsHelper(bool Local) {
|
||||
|
@ -59,17 +59,7 @@ public:
|
||||
return K == ObjectKind || K == SharedKind;
|
||||
}
|
||||
|
||||
static ELFKind getELFKind() {
|
||||
if (!ELFT::Is64Bits) {
|
||||
if (ELFT::TargetEndianness == llvm::support::little)
|
||||
return ELF32LEKind;
|
||||
return ELF32BEKind;
|
||||
}
|
||||
if (ELFT::TargetEndianness == llvm::support::little)
|
||||
return ELF64LEKind;
|
||||
return ELF64BEKind;
|
||||
}
|
||||
|
||||
static ELFKind getELFKind();
|
||||
const llvm::object::ELFFile<ELFT> &getObj() const { return ELFObj; }
|
||||
llvm::object::ELFFile<ELFT> &getObj() { return ELFObj; }
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user