Fix trailing whitespace.
llvm-svn: 200182
diff --git a/lld/lib/ReaderWriter/MachO/MachONormalizedFile.h b/lld/lib/ReaderWriter/MachO/MachONormalizedFile.h
index 435202a..b135998 100644
--- a/lld/lib/ReaderWriter/MachO/MachONormalizedFile.h
+++ b/lld/lib/ReaderWriter/MachO/MachONormalizedFile.h
@@ -10,34 +10,34 @@
///
/// \file These data structures comprise the "normalized" view of
/// mach-o object files. The normalized view is an in-memory only data structure
-/// which is always in native endianness and pointer size.
-///
-/// The normalized view easily converts to and from YAML using YAML I/O.
+/// which is always in native endianness and pointer size.
+///
+/// The normalized view easily converts to and from YAML using YAML I/O.
///
/// The normalized view converts to and from binary mach-o object files using
/// the writeBinary() and readBinary() functions.
///
-/// The normalized view converts to and from lld::Atoms using the
+/// The normalized view converts to and from lld::Atoms using the
/// normalizedToAtoms() and normalizedFromAtoms().
///
/// Overall, the conversion paths available look like:
///
-/// +---------------+
-/// | binary mach-o |
-/// +---------------+
+/// +---------------+
+/// | binary mach-o |
+/// +---------------+
/// ^
/// |
/// v
-/// +------------+ +------+
-/// | normalized | <-> | yaml |
-/// +------------+ +------+
+/// +------------+ +------+
+/// | normalized | <-> | yaml |
+/// +------------+ +------+
/// ^
/// |
/// v
-/// +-------+
+/// +-------+
/// | Atoms |
-/// +-------+
-///
+/// +-------+
+///
#include "lld/Core/Error.h"
#include "lld/Core/LLVM.h"
@@ -76,9 +76,9 @@
/// encoded in one of two different bit-field patterns. This
/// normalized form has the union of all possible fields.
struct Relocation {
- Relocation() : offset(0), scattered(false),
- type(llvm::MachO::GENERIC_RELOC_VANILLA),
- length(0), pcRel(false), isExtern(false), value(0),
+ Relocation() : offset(0), scattered(false),
+ type(llvm::MachO::GENERIC_RELOC_VANILLA),
+ length(0), pcRel(false), isExtern(false), value(0),
symbol(0) { }
Hex32 offset;
@@ -106,7 +106,7 @@
/// Mach-O has a 32-bit and 64-bit section record. This normalized form
/// can support either kind.
struct Section {
- Section() : type(llvm::MachO::S_REGULAR),
+ Section() : type(llvm::MachO::S_REGULAR),
attributes(0), alignment(0), address(0) { }
StringRef segmentName;
@@ -129,7 +129,7 @@
/// Mach-O has a 32-bit and 64-bit symbol table entry (nlist), and the symbol
/// type and scope and mixed in the same n_type field. This normalized form
-/// works for any pointer size and separates out the type and scope.
+/// works for any pointer size and separates out the type and scope.
struct Symbol {
Symbol() : type(llvm::MachO::N_UNDF), scope(0), sect(0), desc(0), value(0) { }
@@ -195,25 +195,25 @@
/// A typedef so that YAML I/O can encode/decode mach_header.flags.
LLVM_YAML_STRONG_TYPEDEF(uint32_t, FileFlags);
-///
+///
struct NormalizedFile {
- NormalizedFile() : arch(MachOLinkingContext::arch_unknown),
+ NormalizedFile() : arch(MachOLinkingContext::arch_unknown),
fileType(llvm::MachO::MH_OBJECT),
- flags(0),
- hasUUID(false),
+ flags(0),
+ hasUUID(false),
os(MachOLinkingContext::OS::unknown) { }
-
+
MachOLinkingContext::Arch arch;
HeaderFileType fileType;
FileFlags flags;
std::vector<Segment> segments; // Not used in object files.
std::vector<Section> sections;
-
+
// Symbols sorted by kind.
std::vector<Symbol> localSymbols;
std::vector<Symbol> globalSymbols;
std::vector<Symbol> undefinedSymbols;
-
+
// Maps to load commands with no LINKEDIT content (final linked images only).
std::vector<DependentDylib> dependentDylibs;
StringRef installName;
@@ -224,20 +224,20 @@
Hex64 sourceVersion;
Hex32 minOSverson;
Hex32 sdkVersion;
-
+
// Maps to load commands with LINKEDIT content (final linked images only).
std::vector<RebaseLocation> rebasingInfo;
std::vector<BindLocation> bindingInfo;
std::vector<BindLocation> weakBindingInfo;
std::vector<BindLocation> lazyBindingInfo;
std::vector<Export> exportInfo;
-
+
// TODO:
// code-signature
// split-seg-info
// function-starts
// data-in-code
-
+
// For any allocations in this struct which need to be owned by this struct.
BumpPtrAllocator ownedAllocations;
};
@@ -249,28 +249,28 @@
const MachOLinkingContext::Arch arch);
/// Takes in-memory normalized view and writes a mach-o object file.
-error_code
+error_code
writeBinary(const NormalizedFile &file, StringRef path);
size_t headerAndLoadCommandsSize(const NormalizedFile &file);
/// Parses a yaml encoded mach-o file to produce an in-memory normalized view.
-ErrorOr<std::unique_ptr<NormalizedFile>>
+ErrorOr<std::unique_ptr<NormalizedFile>>
readYaml(std::unique_ptr<MemoryBuffer> &mb);
/// Writes a yaml encoded mach-o files given an in-memory normalized view.
-error_code
+error_code
writeYaml(const NormalizedFile &file, raw_ostream &out);
/// Takes in-memory normalized dylib or object and parses it into lld::File
ErrorOr<std::unique_ptr<lld::File>>
-normalizedToAtoms(const NormalizedFile &normalizedFile, StringRef path,
+normalizedToAtoms(const NormalizedFile &normalizedFile, StringRef path,
bool copyRefs);
/// Takes atoms and generates a normalized macho-o view.
-ErrorOr<std::unique_ptr<NormalizedFile>>
+ErrorOr<std::unique_ptr<NormalizedFile>>
normalizedFromAtoms(const lld::File &atomFile, const MachOLinkingContext &ctxt);