From: Frederic Riss Date: Fri, 5 Jun 2015 20:27:07 +0000 (+0000) Subject: [dsymutil] Apply clang-format. NFC X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=0f58c38ebd4aebe835edf444916c8f7cfe8e2a79;p=oota-llvm.git [dsymutil] Apply clang-format. NFC git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239186 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/tools/dsymutil/DebugMap.cpp b/tools/dsymutil/DebugMap.cpp index 5e6cb8c7406..5ffb123f1b9 100644 --- a/tools/dsymutil/DebugMap.cpp +++ b/tools/dsymutil/DebugMap.cpp @@ -47,8 +47,8 @@ void DebugMapObject::print(raw_ostream &OS) const { for (const auto &Sym : Entries) { OS << format("\t%016" PRIx64 " => %016" PRIx64 "+0x%x\t%s\n", uint64_t(Sym.second.ObjectAddress), - uint64_t(Sym.second.BinaryAddress), - uint32_t(Sym.second.Size), Sym.first.data()); + uint64_t(Sym.second.BinaryAddress), uint32_t(Sym.second.Size), + Sym.first.data()); } OS << '\n'; } @@ -80,7 +80,7 @@ DebugMapObject::lookupObjectAddress(uint64_t Address) const { void DebugMap::print(raw_ostream &OS) const { yaml::Output yout(OS, /* Ctxt = */ nullptr, /* WrapColumn = */ 0); - yout << const_cast(*this); + yout << const_cast(*this); } #ifndef NDEBUG diff --git a/tools/dsymutil/DebugMap.h b/tools/dsymutil/DebugMap.h index 6f63d7dcfbe..d0edbabb404 100644 --- a/tools/dsymutil/DebugMap.h +++ b/tools/dsymutil/DebugMap.h @@ -163,7 +163,8 @@ private: friend yaml::SequenceTraits>>; friend yaml::SequenceTraits>; DebugMapObject() = default; - public: + +public: DebugMapObject &operator=(DebugMapObject RHS) { std::swap(Filename, RHS.Filename); std::swap(Symbols, RHS.Symbols); diff --git a/tools/dsymutil/DwarfLinker.cpp b/tools/dsymutil/DwarfLinker.cpp index fd79526fbac..c5a8b011461 100644 --- a/tools/dsymutil/DwarfLinker.cpp +++ b/tools/dsymutil/DwarfLinker.cpp @@ -186,8 +186,8 @@ public: void addTypeAccelerator(const DIE *Die, const char *Name, uint32_t Offset); struct AccelInfo { - StringRef Name; ///< Name of the entry. - const DIE *Die; ///< DIE this entry describes. + StringRef Name; ///< Name of the entry. + const DIE *Die; ///< DIE this entry describes. uint32_t NameOffset; ///< Offset of Name in the string pool. bool SkipPubSection; ///< Emit this entry only in the apple_* sections. @@ -965,7 +965,7 @@ void DwarfStreamer::emitPubSectionForUnit( Asm->EmitLabelDifference(EndLabel, BeginLabel, 4); // Length Asm->OutStreamer->EmitLabel(BeginLabel); Asm->EmitInt16(dwarf::DW_PUBNAMES_VERSION); // Version - Asm->EmitInt32(Unit.getStartOffset()); // Unit offset + Asm->EmitInt32(Unit.getStartOffset()); // Unit offset Asm->EmitInt32(Unit.getNextUnitOffset() - Unit.getStartOffset()); // Size HeaderEmitted = true; } @@ -1515,8 +1515,8 @@ bool DwarfLinker::hasValidRelocation(uint32_t StartOffset, uint32_t EndOffset, uint64_t(Mapping.ObjectAddress), uint64_t(Mapping.BinaryAddress)); - Info.AddrAdjust = int64_t(Mapping.BinaryAddress) + - ValidReloc.Addend - Mapping.ObjectAddress; + Info.AddrAdjust = int64_t(Mapping.BinaryAddress) + ValidReloc.Addend - + Mapping.ObjectAddress; Info.InDebugMap = true; return true; } @@ -2322,8 +2322,7 @@ static void insertLineSequence(std::vector &Seq, /// are present in the binary. void DwarfLinker::patchLineTableForUnit(CompileUnit &Unit, DWARFContext &OrigDwarf) { - const DWARFDebugInfoEntryMinimal *CUDie = - Unit.getOrigUnit().getUnitDIE(); + const DWARFDebugInfoEntryMinimal *CUDie = Unit.getOrigUnit().getUnitDIE(); uint64_t StmtList = CUDie->getAttributeValueAsSectionOffset( &Unit.getOrigUnit(), dwarf::DW_AT_stmt_list, -1ULL); if (StmtList == -1ULL) @@ -2331,10 +2330,11 @@ void DwarfLinker::patchLineTableForUnit(CompileUnit &Unit, // Update the cloned DW_AT_stmt_list with the correct debug_line offset. if (auto *OutputDIE = Unit.getOutputUnitDIE()) { - auto Stmt = std::find_if(OutputDIE->values_begin(), OutputDIE->values_end(), - [](const DIEValue &Value) { - return Value.getAttribute() == dwarf::DW_AT_stmt_list; - }); + auto Stmt = + std::find_if(OutputDIE->values_begin(), OutputDIE->values_end(), + [](const DIEValue &Value) { + return Value.getAttribute() == dwarf::DW_AT_stmt_list; + }); assert(Stmt != OutputDIE->values_end() && "Didn't find DW_AT_stmt_list in cloned DIE!"); OutputDIE->setValue(Stmt - OutputDIE->values_begin(), diff --git a/tools/dsymutil/MachODebugMapParser.cpp b/tools/dsymutil/MachODebugMapParser.cpp index ad2bf5ffa6f..b803e410199 100644 --- a/tools/dsymutil/MachODebugMapParser.cpp +++ b/tools/dsymutil/MachODebugMapParser.cpp @@ -244,7 +244,6 @@ void MachODebugMapParser::loadMainBinarySymbols() { namespace llvm { namespace dsymutil { - llvm::ErrorOr> parseDebugMap(StringRef InputFile, StringRef PrependPath, bool Verbose, diff --git a/tools/dsymutil/dsymutil.h b/tools/dsymutil/dsymutil.h index 0cbdaf5503a..40891877983 100644 --- a/tools/dsymutil/dsymutil.h +++ b/tools/dsymutil/dsymutil.h @@ -33,9 +33,10 @@ struct LinkOptions { /// \brief Extract the DebugMap from the given file. /// The file has to be a MachO object file. -llvm::ErrorOr> -parseDebugMap(StringRef InputFile, StringRef PrependPath, - bool Verbose, bool InputIsYAML); +llvm::ErrorOr> parseDebugMap(StringRef InputFile, + StringRef PrependPath, + bool Verbose, + bool InputIsYAML); /// \brief Link the Dwarf debuginfo as directed by the passed DebugMap /// \p DM into a DwarfFile named \p OutputFilename.