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 | 31fce896458466a8dc06f592da93b8cd150c8982 (patch) | |
tree | 4cfb7acfd754253fe4600961b0c782729a2d0a29 /llvm/tools/llvm-readobj/MachODumper.cpp | |
parent | 79bb550577c29b9603720546fc6863a4cac56dee (diff) | |
download | bcm5719-llvm-31fce896458466a8dc06f592da93b8cd150c8982.tar.gz bcm5719-llvm-31fce896458466a8dc06f592da93b8cd150c8982.zip |
Remove two uses of getObject.
llvm-svn: 178985
Diffstat (limited to 'llvm/tools/llvm-readobj/MachODumper.cpp')
-rw-r--r-- | llvm/tools/llvm-readobj/MachODumper.cpp | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/llvm/tools/llvm-readobj/MachODumper.cpp b/llvm/tools/llvm-readobj/MachODumper.cpp index 8f37b9a1837..190baa229b5 100644 --- a/llvm/tools/llvm-readobj/MachODumper.cpp +++ b/llvm/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; |