diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2013-04-07 15:46:05 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2013-04-07 15:46:05 +0000 |
commit | 0be4eafd9c90d5e584b951fe2970f024341486c3 (patch) | |
tree | 4c1c4e62a2e553a75073a4b06db0c1b1a4a6719b /tools/llvm-readobj | |
parent | 1efa60453be658242f468f4be4f8d4855ace60d1 (diff) | |
download | llvm-0be4eafd9c90d5e584b951fe2970f024341486c3.tar.gz llvm-0be4eafd9c90d5e584b951fe2970f024341486c3.tar.bz2 llvm-0be4eafd9c90d5e584b951fe2970f024341486c3.tar.xz |
Remove two uses of getObject.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178985 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/llvm-readobj')
-rw-r--r-- | tools/llvm-readobj/MachODumper.cpp | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/tools/llvm-readobj/MachODumper.cpp b/tools/llvm-readobj/MachODumper.cpp index 8f37b9a183..190baa229b 100644 --- a/tools/llvm-readobj/MachODumper.cpp +++ b/tools/llvm-readobj/MachODumper.cpp @@ -157,20 +157,10 @@ namespace { }; } -static bool is64BitLoadCommand(const MachOObject *MachOObj, DataRefImpl DRI) { - LoadCommandInfo LCI = MachOObj->getLoadCommandInfo(DRI.d.a); - if (LCI.Command.Type == macho::LCT_Segment64) - return true; - assert(LCI.Command.Type == macho::LCT_Segment && "Unexpected Type."); - return false; -} - static void getSection(const MachOObjectFile *Obj, DataRefImpl DRI, MachOSection &Section) { - const MachOObject *MachOObj = Obj->getObject(); - - if (is64BitLoadCommand(MachOObj, DRI)) { + if (Obj->is64Bit()) { const MachOFormat::Section64 *Sect = Obj->getSection64(DRI); Section.Address = Sect->Address; @@ -200,8 +190,7 @@ static void getSection(const MachOObjectFile *Obj, static void getSymbol(const MachOObjectFile *Obj, DataRefImpl DRI, MachOSymbol &Symbol) { - const MachOObject *MachOObj = Obj->getObject(); - if (MachOObj->is64Bit()) { + if (Obj->is64Bit()) { const MachOFormat::Symbol64TableEntry *Entry = Obj->getSymbol64TableEntry( DRI); Symbol.StringIndex = Entry->StringIndex; |