summaryrefslogtreecommitdiffstats
path: root/llvm/tools/dsymutil/MachOUtils.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/tools/dsymutil/MachOUtils.cpp')
-rw-r--r--llvm/tools/dsymutil/MachOUtils.cpp27
1 files changed, 13 insertions, 14 deletions
diff --git a/llvm/tools/dsymutil/MachOUtils.cpp b/llvm/tools/dsymutil/MachOUtils.cpp
index 9035e947c54..562dd5d7998 100644
--- a/llvm/tools/dsymutil/MachOUtils.cpp
+++ b/llvm/tools/dsymutil/MachOUtils.cpp
@@ -10,13 +10,12 @@
#include "MachOUtils.h"
#include "BinaryHolder.h"
#include "DebugMap.h"
-#include "dsymutil.h"
#include "NonRelocatableStringpool.h"
-#include "llvm/MC/MCSectionMachO.h"
+#include "dsymutil.h"
#include "llvm/MC/MCAsmLayout.h"
-#include "llvm/MC/MCSectionMachO.h"
-#include "llvm/MC/MCObjectStreamer.h"
#include "llvm/MC/MCMachObjectWriter.h"
+#include "llvm/MC/MCObjectStreamer.h"
+#include "llvm/MC/MCSectionMachO.h"
#include "llvm/MC/MCStreamer.h"
#include "llvm/Object/MachO.h"
#include "llvm/Support/FileUtilities.h"
@@ -101,9 +100,9 @@ bool generateUniversalBinary(SmallVectorImpl<ArchAndFilename> &ArchFiles,
return Options.NoOutput ? true : runLipo(SDKPath, Args);
}
-// Return a MachO::segment_command_64 that holds the same values as
-// the passed MachO::segment_command. We do that to avoid having to
-// duplicat the logic for 32bits and 64bits segments.
+// Return a MachO::segment_command_64 that holds the same values as the passed
+// MachO::segment_command. We do that to avoid having to duplicate the logic
+// for 32bits and 64bits segments.
struct MachO::segment_command_64 adaptFrom32bits(MachO::segment_command Seg) {
MachO::segment_command_64 Seg64;
Seg64.cmd = Seg.cmd;
@@ -137,9 +136,9 @@ static void iterateOnSegments(const object::MachOObjectFile &Obj,
}
}
-// Transfer the symbols described by \a NList to \a NewSymtab which is
-// just the raw contents of the symbol table for the dSYM companion file.
-// \returns whether the symbol was tranfered or not.
+// Transfer the symbols described by \a NList to \a NewSymtab which is just the
+// raw contents of the symbol table for the dSYM companion file. \returns
+// whether the symbol was transferred or not.
template <typename NListTy>
static bool transferSymbol(NListTy NList, bool IsLittleEndian,
StringRef Strings, SmallVectorImpl<char> &NewSymtab,
@@ -467,7 +466,7 @@ bool generateDsymCompanion(const DebugMap &DM, MCStreamer &MS,
if (DwarfVMAddr + DwarfSegmentSize > DwarfVMMax ||
DwarfVMAddr + DwarfSegmentSize < DwarfVMAddr /* Overflow */) {
// There is no room for the __DWARF segment at the end of the
- // address space. Look trhough segments to find a gap.
+ // address space. Look through segments to find a gap.
DwarfVMAddr = GapForDwarf;
if (DwarfVMAddr == UINT64_MAX)
warn("not enough VM space for the __DWARF segment.",
@@ -521,6 +520,6 @@ bool generateDsymCompanion(const DebugMap &DM, MCStreamer &MS,
return true;
}
-}
-}
-}
+} // namespace MachOUtils
+} // namespace dsymutil
+} // namespace llvm
OpenPOWER on IntegriCloud