From 70ad98aca403cd1cb75fb326517e528b589808a4 Mon Sep 17 00:00:00 2001 From: NAKAMURA Takumi Date: Tue, 22 Sep 2015 11:13:55 +0000 Subject: Reformat. llvm-svn: 248261 --- llvm/lib/Object/MachOObjectFile.cpp | 57 ++++++++++++++++++------------------- 1 file changed, 27 insertions(+), 30 deletions(-) (limited to 'llvm/lib/Object/MachOObjectFile.cpp') 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 T) - : Trie(T), Malformed(false), Done(false) { } +ExportEntry::ExportEntry(ArrayRef 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 MachOObjectFile::rebaseTable() const { return rebaseTable(getDyldInfoRebaseOpcodes(), is64Bit()); } - -MachOBindEntry::MachOBindEntry(ArrayRef Bytes, bool is64Bit, - Kind BK) +MachOBindEntry::MachOBindEntry(ArrayRef 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 MachOObjectFile::getDyldInfoRebaseOpcodes() const { if (!DyldInfoLoadCmd) return None; - MachO::dyld_info_command DyldInfo - = getStruct(this, DyldInfoLoadCmd); - const uint8_t *Ptr = reinterpret_cast( - getPtr(this, DyldInfo.rebase_off)); + MachO::dyld_info_command DyldInfo = + getStruct(this, DyldInfoLoadCmd); + const uint8_t *Ptr = + reinterpret_cast(getPtr(this, DyldInfo.rebase_off)); return makeArrayRef(Ptr, DyldInfo.rebase_size); } @@ -2217,10 +2214,10 @@ ArrayRef MachOObjectFile::getDyldInfoBindOpcodes() const { if (!DyldInfoLoadCmd) return None; - MachO::dyld_info_command DyldInfo - = getStruct(this, DyldInfoLoadCmd); - const uint8_t *Ptr = reinterpret_cast( - getPtr(this, DyldInfo.bind_off)); + MachO::dyld_info_command DyldInfo = + getStruct(this, DyldInfoLoadCmd); + const uint8_t *Ptr = + reinterpret_cast(getPtr(this, DyldInfo.bind_off)); return makeArrayRef(Ptr, DyldInfo.bind_size); } @@ -2228,10 +2225,10 @@ ArrayRef MachOObjectFile::getDyldInfoWeakBindOpcodes() const { if (!DyldInfoLoadCmd) return None; - MachO::dyld_info_command DyldInfo - = getStruct(this, DyldInfoLoadCmd); - const uint8_t *Ptr = reinterpret_cast( - getPtr(this, DyldInfo.weak_bind_off)); + MachO::dyld_info_command DyldInfo = + getStruct(this, DyldInfoLoadCmd); + const uint8_t *Ptr = + reinterpret_cast(getPtr(this, DyldInfo.weak_bind_off)); return makeArrayRef(Ptr, DyldInfo.weak_bind_size); } @@ -2239,10 +2236,10 @@ ArrayRef MachOObjectFile::getDyldInfoLazyBindOpcodes() const { if (!DyldInfoLoadCmd) return None; - MachO::dyld_info_command DyldInfo - = getStruct(this, DyldInfoLoadCmd); - const uint8_t *Ptr = reinterpret_cast( - getPtr(this, DyldInfo.lazy_bind_off)); + MachO::dyld_info_command DyldInfo = + getStruct(this, DyldInfoLoadCmd); + const uint8_t *Ptr = + reinterpret_cast(getPtr(this, DyldInfo.lazy_bind_off)); return makeArrayRef(Ptr, DyldInfo.lazy_bind_size); } @@ -2250,10 +2247,10 @@ ArrayRef MachOObjectFile::getDyldInfoExportsTrie() const { if (!DyldInfoLoadCmd) return None; - MachO::dyld_info_command DyldInfo - = getStruct(this, DyldInfoLoadCmd); - const uint8_t *Ptr = reinterpret_cast( - getPtr(this, DyldInfo.export_off)); + MachO::dyld_info_command DyldInfo = + getStruct(this, DyldInfoLoadCmd); + const uint8_t *Ptr = + reinterpret_cast(getPtr(this, DyldInfo.export_off)); return makeArrayRef(Ptr, DyldInfo.export_size); } -- cgit v1.2.3