mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-22 09:25:44 +00:00
Introduce convenience typedefs for the 4 ELF object types.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181509 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -79,22 +79,18 @@ void printProgramHeaders(
|
||||
|
||||
void llvm::printELFFileHeader(const object::ObjectFile *Obj) {
|
||||
// Little-endian 32-bit
|
||||
if (const ELFObjectFile<ELFType<support::little, 4, false> > *ELFObj =
|
||||
dyn_cast<ELFObjectFile<ELFType<support::little, 4, false> > >(Obj))
|
||||
if (const ELF32LEObjectFile *ELFObj = dyn_cast<ELF32LEObjectFile>(Obj))
|
||||
printProgramHeaders(ELFObj);
|
||||
|
||||
// Big-endian 32-bit
|
||||
if (const ELFObjectFile<ELFType<support::big, 4, false> > *ELFObj =
|
||||
dyn_cast<ELFObjectFile<ELFType<support::big, 4, false> > >(Obj))
|
||||
if (const ELF32BEObjectFile *ELFObj = dyn_cast<ELF32BEObjectFile>(Obj))
|
||||
printProgramHeaders(ELFObj);
|
||||
|
||||
// Little-endian 64-bit
|
||||
if (const ELFObjectFile<ELFType<support::little, 8, true> > *ELFObj =
|
||||
dyn_cast<ELFObjectFile<ELFType<support::little, 8, true> > >(Obj))
|
||||
if (const ELF64LEObjectFile *ELFObj = dyn_cast<ELF64LEObjectFile>(Obj))
|
||||
printProgramHeaders(ELFObj);
|
||||
|
||||
// Big-endian 64-bit
|
||||
if (const ELFObjectFile<ELFType<support::big, 8, true> > *ELFObj =
|
||||
dyn_cast<ELFObjectFile<ELFType<support::big, 8, true> > >(Obj))
|
||||
if (const ELF64BEObjectFile *ELFObj = dyn_cast<ELF64BEObjectFile>(Obj))
|
||||
printProgramHeaders(ELFObj);
|
||||
}
|
||||
|
Reference in New Issue
Block a user