diff options
author | NAKAMURA Takumi <geek4civic@gmail.com> | 2015-09-22 11:13:55 +0000 |
---|---|---|
committer | NAKAMURA Takumi <geek4civic@gmail.com> | 2015-09-22 11:13:55 +0000 |
commit | 70ad98aca403cd1cb75fb326517e528b589808a4 (patch) | |
tree | 1c34b9ab728cbfa597c6f80cb59cb12b128e7652 /llvm/lib/Object/MachOObjectFile.cpp | |
parent | 59a16a76beb8f46525eaab65fff915a9941d75ea (diff) | |
download | bcm5719-llvm-70ad98aca403cd1cb75fb326517e528b589808a4.tar.gz bcm5719-llvm-70ad98aca403cd1cb75fb326517e528b589808a4.zip |
Reformat.
llvm-svn: 248261
Diffstat (limited to 'llvm/lib/Object/MachOObjectFile.cpp')
-rw-r--r-- | llvm/lib/Object/MachOObjectFile.cpp | 57 |
1 files changed, 27 insertions, 30 deletions
diff --git a/llvm/lib/Object/MachOObjectFile.cpp b/llvm/lib/Object/MachOObjectFile.cpp index 571ed7a14fb..c053313d293 100644 --- a/llvm/lib/Object/MachOObjectFile.cpp +++ b/llvm/lib/Object/MachOObjectFile.cpp @@ -1208,8 +1208,8 @@ dice_iterator MachOObjectFile::end_dices() const { return dice_iterator(DiceRef(DRI, this)); } -ExportEntry::ExportEntry(ArrayRef<uint8_t> T) - : Trie(T), Malformed(false), Done(false) { } +ExportEntry::ExportEntry(ArrayRef<uint8_t> T) + : Trie(T), Malformed(false), Done(false) {} void ExportEntry::moveToFirst() { pushNode(0); @@ -1277,11 +1277,10 @@ uint32_t ExportEntry::nodeOffset() const { return Stack.back().Start - Trie.begin(); } -ExportEntry::NodeState::NodeState(const uint8_t *Ptr) - : Start(Ptr), Current(Ptr), Flags(0), Address(0), Other(0), - ImportName(nullptr), ChildCount(0), NextChildIndex(0), - ParentStringLength(0), IsExportNode(false) { -} +ExportEntry::NodeState::NodeState(const uint8_t *Ptr) + : Start(Ptr), Current(Ptr), Flags(0), Address(0), Other(0), + ImportName(nullptr), ChildCount(0), NextChildIndex(0), + ParentStringLength(0), IsExportNode(false) {} void ExportEntry::pushNode(uint64_t offset) { const uint8_t *Ptr = Trie.begin() + offset; @@ -1559,9 +1558,7 @@ iterator_range<rebase_iterator> MachOObjectFile::rebaseTable() const { return rebaseTable(getDyldInfoRebaseOpcodes(), is64Bit()); } - -MachOBindEntry::MachOBindEntry(ArrayRef<uint8_t> Bytes, bool is64Bit, - Kind BK) +MachOBindEntry::MachOBindEntry(ArrayRef<uint8_t> Bytes, bool is64Bit, Kind BK) : Opcodes(Bytes), Ptr(Bytes.begin()), SegmentOffset(0), SegmentIndex(0), Ordinal(0), Flags(0), Addend(0), RemainingLoopCount(0), AdvanceAmount(0), BindType(0), PointerSize(is64Bit ? 8 : 4), @@ -2206,10 +2203,10 @@ ArrayRef<uint8_t> MachOObjectFile::getDyldInfoRebaseOpcodes() const { if (!DyldInfoLoadCmd) return None; - MachO::dyld_info_command DyldInfo - = getStruct<MachO::dyld_info_command>(this, DyldInfoLoadCmd); - const uint8_t *Ptr = reinterpret_cast<const uint8_t*>( - getPtr(this, DyldInfo.rebase_off)); + MachO::dyld_info_command DyldInfo = + getStruct<MachO::dyld_info_command>(this, DyldInfoLoadCmd); + const uint8_t *Ptr = + reinterpret_cast<const uint8_t *>(getPtr(this, DyldInfo.rebase_off)); return makeArrayRef(Ptr, DyldInfo.rebase_size); } @@ -2217,10 +2214,10 @@ ArrayRef<uint8_t> MachOObjectFile::getDyldInfoBindOpcodes() const { if (!DyldInfoLoadCmd) return None; - MachO::dyld_info_command DyldInfo - = getStruct<MachO::dyld_info_command>(this, DyldInfoLoadCmd); - const uint8_t *Ptr = reinterpret_cast<const uint8_t*>( - getPtr(this, DyldInfo.bind_off)); + MachO::dyld_info_command DyldInfo = + getStruct<MachO::dyld_info_command>(this, DyldInfoLoadCmd); + const uint8_t *Ptr = + reinterpret_cast<const uint8_t *>(getPtr(this, DyldInfo.bind_off)); return makeArrayRef(Ptr, DyldInfo.bind_size); } @@ -2228,10 +2225,10 @@ ArrayRef<uint8_t> MachOObjectFile::getDyldInfoWeakBindOpcodes() const { if (!DyldInfoLoadCmd) return None; - MachO::dyld_info_command DyldInfo - = getStruct<MachO::dyld_info_command>(this, DyldInfoLoadCmd); - const uint8_t *Ptr = reinterpret_cast<const uint8_t*>( - getPtr(this, DyldInfo.weak_bind_off)); + MachO::dyld_info_command DyldInfo = + getStruct<MachO::dyld_info_command>(this, DyldInfoLoadCmd); + const uint8_t *Ptr = + reinterpret_cast<const uint8_t *>(getPtr(this, DyldInfo.weak_bind_off)); return makeArrayRef(Ptr, DyldInfo.weak_bind_size); } @@ -2239,10 +2236,10 @@ ArrayRef<uint8_t> MachOObjectFile::getDyldInfoLazyBindOpcodes() const { if (!DyldInfoLoadCmd) return None; - MachO::dyld_info_command DyldInfo - = getStruct<MachO::dyld_info_command>(this, DyldInfoLoadCmd); - const uint8_t *Ptr = reinterpret_cast<const uint8_t*>( - getPtr(this, DyldInfo.lazy_bind_off)); + MachO::dyld_info_command DyldInfo = + getStruct<MachO::dyld_info_command>(this, DyldInfoLoadCmd); + const uint8_t *Ptr = + reinterpret_cast<const uint8_t *>(getPtr(this, DyldInfo.lazy_bind_off)); return makeArrayRef(Ptr, DyldInfo.lazy_bind_size); } @@ -2250,10 +2247,10 @@ ArrayRef<uint8_t> MachOObjectFile::getDyldInfoExportsTrie() const { if (!DyldInfoLoadCmd) return None; - MachO::dyld_info_command DyldInfo - = getStruct<MachO::dyld_info_command>(this, DyldInfoLoadCmd); - const uint8_t *Ptr = reinterpret_cast<const uint8_t*>( - getPtr(this, DyldInfo.export_off)); + MachO::dyld_info_command DyldInfo = + getStruct<MachO::dyld_info_command>(this, DyldInfoLoadCmd); + const uint8_t *Ptr = + reinterpret_cast<const uint8_t *>(getPtr(this, DyldInfo.export_off)); return makeArrayRef(Ptr, DyldInfo.export_size); } |