[lld] r230192 - [Core,MachO,Test] Remove trailing whitespace.

Shankar Easwaran shankare at codeaurora.org
Sun Feb 22 15:54:38 PST 2015


Author: shankare
Date: Sun Feb 22 17:54:38 2015
New Revision: 230192

URL: http://llvm.org/viewvc/llvm-project?rev=230192&view=rev
Log:
[Core,MachO,Test] Remove trailing whitespace.

Modified:
    lld/trunk/include/lld/Core/Error.h
    lld/trunk/lib/Core/Error.cpp
    lld/trunk/lib/ReaderWriter/MachO/ArchHandler.h
    lld/trunk/lib/ReaderWriter/MachO/ArchHandler_arm.cpp
    lld/trunk/lib/ReaderWriter/MachO/ArchHandler_x86.cpp
    lld/trunk/lib/ReaderWriter/MachO/ArchHandler_x86_64.cpp
    lld/trunk/lib/ReaderWriter/MachO/File.h
    lld/trunk/lib/ReaderWriter/MachO/GOTPass.cpp
    lld/trunk/lib/ReaderWriter/MachO/MachONormalizedFileBinaryReader.cpp
    lld/trunk/lib/ReaderWriter/MachO/MachONormalizedFileFromAtoms.cpp
    lld/trunk/lib/ReaderWriter/MachO/MachONormalizedFileToAtoms.cpp
    lld/trunk/lib/ReaderWriter/MachO/StubsPass.cpp
    lld/trunk/test/LinkerScript/sections.test
    lld/trunk/test/elf/Mips/exe-dynamic.test
    lld/trunk/test/elf/Mips/gp-sym-1.test
    lld/trunk/test/elf/Mips/tls-4.test
    lld/trunk/test/elf/consecutive-weak-sym-defs.test
    lld/trunk/test/elf/export-dynamic.test

Modified: lld/trunk/include/lld/Core/Error.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/include/lld/Core/Error.h?rev=230192&r1=230191&r2=230192&view=diff
==============================================================================
--- lld/trunk/include/lld/Core/Error.h (original)
+++ lld/trunk/include/lld/Core/Error.h Sun Feb 22 17:54:38 2015
@@ -60,9 +60,9 @@ inline std::error_code make_error_code(L
 
 /// Creates an error_code object that has associated with it an arbitrary
 /// error messsage.  The value() of the error_code will always be non-zero
-/// but its value is meaningless. The messsage() will be (a copy of) the 
+/// but its value is meaningless. The messsage() will be (a copy of) the
 /// supplied error string.
-/// Note:  Once ErrorOr<> is updated to work with errors other than error_code, 
+/// Note:  Once ErrorOr<> is updated to work with errors other than error_code,
 /// this can be updated to return some other kind of error.
 std::error_code make_dynamic_error_code(StringRef msg);
 std::error_code make_dynamic_error_code(const Twine &msg);

Modified: lld/trunk/lib/Core/Error.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/Core/Error.cpp?rev=230192&r1=230191&r2=230192&view=diff
==============================================================================
--- lld/trunk/lib/Core/Error.cpp (original)
+++ lld/trunk/lib/Core/Error.cpp Sun Feb 22 17:54:38 2015
@@ -101,7 +101,7 @@ const std::error_category &lld::LinkerSc
 namespace lld {
 
 /// Temporary class to enable make_dynamic_error_code() until
-/// llvm::ErrorOr<> is updated to work with error encapsulations 
+/// llvm::ErrorOr<> is updated to work with error encapsulations
 /// other than error_code.
 class dynamic_error_category : public std::error_category {
 public:

Modified: lld/trunk/lib/ReaderWriter/MachO/ArchHandler.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/MachO/ArchHandler.h?rev=230192&r1=230191&r2=230192&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/MachO/ArchHandler.h (original)
+++ lld/trunk/lib/ReaderWriter/MachO/ArchHandler.h Sun Feb 22 17:54:38 2015
@@ -29,15 +29,15 @@ namespace mach_o {
 class ArchHandler {
 public:
   virtual ~ArchHandler();
-  
+
   /// There is no public interface to subclasses of ArchHandler, so this
   /// is the only way to instantiate an ArchHandler.
   static std::unique_ptr<ArchHandler> create(MachOLinkingContext::Arch arch);
 
   /// Get (arch specific) kind strings used by Registry.
   virtual const Registry::KindStrings *kindStrings() = 0;
-  
-  /// Convert mach-o Arch to Reference::KindArch. 
+
+  /// Convert mach-o Arch to Reference::KindArch.
   virtual Reference::KindArch kindArch() = 0;
 
   /// Used by StubPass to update References to shared library functions
@@ -88,48 +88,48 @@ public:
 
   virtual const Atom *fdeTargetFunction(const DefinedAtom *fde);
 
-  /// Used by normalizedFromAtoms() to know where to generated rebasing and 
+  /// Used by normalizedFromAtoms() to know where to generated rebasing and
   /// binding info in final executables.
   virtual bool isPointer(const Reference &) = 0;
-  
-  /// Used by normalizedFromAtoms() to know where to generated lazy binding 
+
+  /// Used by normalizedFromAtoms() to know where to generated lazy binding
   /// info in final executables.
   virtual bool isLazyPointer(const Reference &);
 
   /// Returns true if the specified relocation is paired to the next relocation.
   virtual bool isPairedReloc(const normalized::Relocation &) = 0;
 
-  /// Prototype for a helper function.  Given a sectionIndex and address, 
-  /// finds the atom and offset with that atom of that address. 
-  typedef std::function<std::error_code (uint32_t sectionIndex, uint64_t addr, 
-                        const lld::Atom **, Reference::Addend *)> 
+  /// Prototype for a helper function.  Given a sectionIndex and address,
+  /// finds the atom and offset with that atom of that address.
+  typedef std::function<std::error_code (uint32_t sectionIndex, uint64_t addr,
+                        const lld::Atom **, Reference::Addend *)>
                         FindAtomBySectionAndAddress;
-  
+
   /// Prototype for a helper function.  Given a symbolIndex, finds the atom
   /// representing that symbol.
-  typedef std::function<std::error_code (uint32_t symbolIndex, 
+  typedef std::function<std::error_code (uint32_t symbolIndex,
                         const lld::Atom **)> FindAtomBySymbolIndex;
 
   /// Analyzes a relocation from a .o file and returns the info
   /// (kind, target, addend) needed to instantiate a Reference.
   /// Two helper functions are passed as parameters to find the target atom
   /// given a symbol index or address.
-  virtual std::error_code 
+  virtual std::error_code
           getReferenceInfo(const normalized::Relocation &reloc,
                            const DefinedAtom *inAtom,
                            uint32_t offsetInAtom,
                            uint64_t fixupAddress, bool isBigEndian,
                            FindAtomBySectionAndAddress atomFromAddress,
                            FindAtomBySymbolIndex atomFromSymbolIndex,
-                           Reference::KindValue *kind, 
-                           const lld::Atom **target, 
+                           Reference::KindValue *kind,
+                           const lld::Atom **target,
                            Reference::Addend *addend) = 0;
 
   /// Analyzes a pair of relocations from a .o file and returns the info
   /// (kind, target, addend) needed to instantiate a Reference.
   /// Two helper functions are passed as parameters to find the target atom
   /// given a symbol index or address.
-  virtual std::error_code 
+  virtual std::error_code
       getPairReferenceInfo(const normalized::Relocation &reloc1,
                            const normalized::Relocation &reloc2,
                            const DefinedAtom *inAtom,
@@ -137,8 +137,8 @@ public:
                            uint64_t fixupAddress, bool isBig, bool scatterable,
                            FindAtomBySectionAndAddress atomFromAddress,
                            FindAtomBySymbolIndex atomFromSymbolIndex,
-                           Reference::KindValue *kind, 
-                           const lld::Atom **target, 
+                           Reference::KindValue *kind,
+                           const lld::Atom **target,
                            Reference::Addend *addend) = 0;
 
   /// Prototype for a helper function.  Given an atom, finds the symbol table
@@ -234,7 +234,7 @@ public:
     ReferenceInfo   lazyPointerReferenceToFinal;
     ReferenceInfo   nonLazyPointerReferenceToBinder;
     uint8_t         codeAlignment;
-    
+
     uint32_t        stubSize;
     uint8_t         stubBytes[16];
     ReferenceInfo   stubReferenceToLP;

Modified: lld/trunk/lib/ReaderWriter/MachO/ArchHandler_arm.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/MachO/ArchHandler_arm.cpp?rev=230192&r1=230191&r2=230192&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/MachO/ArchHandler_arm.cpp (original)
+++ lld/trunk/lib/ReaderWriter/MachO/ArchHandler_arm.cpp Sun Feb 22 17:54:38 2015
@@ -176,13 +176,13 @@ private:
   static uint16_t getWordFromThumbMov(uint32_t instruction);
   static uint16_t getWordFromArmMov(uint32_t instruction);
   static uint32_t clearThumbBit(uint32_t value, const Atom *target);
-  static uint32_t setDisplacementInArmBranch(uint32_t instr, int32_t disp, 
+  static uint32_t setDisplacementInArmBranch(uint32_t instr, int32_t disp,
                                              bool targetIsThumb);
   static uint32_t setDisplacementInThumbBranch(uint32_t instr, uint32_t ia,
                                                int32_t disp, bool targetThumb);
   static uint32_t setWordFromThumbMov(uint32_t instruction, uint16_t word);
   static uint32_t setWordFromArmMov(uint32_t instruction, uint16_t word);
-  
+
   StringRef stubName(const DefinedAtom &);
   bool useExternalRelocationTo(const Atom &target);
 
@@ -233,25 +233,25 @@ const Registry::KindStrings ArchHandler_
 const ArchHandler::StubInfo ArchHandler_arm::_sStubInfoArmPIC = {
   "dyld_stub_binder",
 
-  // References in lazy pointer  
+  // References in lazy pointer
   { Reference::KindArch::ARM, pointer32, 0, 0 },
   { Reference::KindArch::ARM, lazyPointer, 0, 0 },
-  
+
   // GOT pointer to dyld_stub_binder
   { Reference::KindArch::ARM, pointer32, 0, 0 },
 
   // arm code alignment 2^2
-  2, 
-  
+  2,
+
   // Stub size and code
-  16, 
+  16,
   { 0x04, 0xC0, 0x9F, 0xE5,       // 	ldr ip, pc + 12
     0x0C, 0xC0, 0x8F, 0xE0,       //  add ip, pc, ip
     0x00, 0xF0, 0x9C, 0xE5,       // 	ldr pc, [ip]
     0x00, 0x00, 0x00, 0x00 },     // 	.long L_foo$lazy_ptr - (L1$scv + 8)
   { Reference::KindArch::ARM, delta32, 12, 0 },
   { false, 0, 0, 0 },
-  
+
   // Stub Helper size and code
   12,
   { 0x00, 0xC0, 0x9F, 0xE5,       // ldr   ip, [pc, #0]
@@ -259,7 +259,7 @@ const ArchHandler::StubInfo ArchHandler_
     0x00, 0x00, 0x00, 0x00 },     // .long  lazy-info-offset
   { Reference::KindArch::ARM, lazyImmediateLocation, 8, 0 },
   { Reference::KindArch::ARM, arm_b24, 4, 0 },
-  
+
   // Stub Helper-Common size and code
   36,
 	{ // push lazy-info-offset

Modified: lld/trunk/lib/ReaderWriter/MachO/ArchHandler_x86.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/MachO/ArchHandler_x86.cpp?rev=230192&r1=230191&r2=230192&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/MachO/ArchHandler_x86.cpp (original)
+++ lld/trunk/lib/ReaderWriter/MachO/ArchHandler_x86.cpp Sun Feb 22 17:54:38 2015
@@ -152,7 +152,7 @@ private:
     lazyPointer,           /// Location contains a lazy pointer.
     lazyImmediateLocation, /// Location contains immediate value used in stub.
   };
-  
+
   static bool useExternalRelocationTo(const Atom &target);
 
   void applyFixupFinal(const Reference &ref, uint8_t *location,
@@ -170,9 +170,9 @@ private:
 //===----------------------------------------------------------------------===//
 
 ArchHandler_x86::ArchHandler_x86() {}
-  
+
 ArchHandler_x86::~ArchHandler_x86() { }
-  
+
 const Registry::KindStrings ArchHandler_x86::_sKindStrings[] = {
   LLD_KIND_STRING_ENTRY(invalid),
   LLD_KIND_STRING_ENTRY(modeCode),
@@ -192,29 +192,29 @@ const Registry::KindStrings ArchHandler_
 const ArchHandler::StubInfo ArchHandler_x86::_sStubInfo = {
   "dyld_stub_binder",
 
-  // Lazy pointer references 
+  // Lazy pointer references
   { Reference::KindArch::x86, pointer32, 0, 0 },
   { Reference::KindArch::x86, lazyPointer, 0, 0 },
-  
+
   // GOT pointer to dyld_stub_binder
   { Reference::KindArch::x86, pointer32, 0, 0 },
 
   // x86 code alignment
-  1, 
-  
+  1,
+
   // Stub size and code
-  6, 
+  6,
   { 0xff, 0x25, 0x00, 0x00, 0x00, 0x00 },       // jmp *lazyPointer
   { Reference::KindArch::x86, abs32, 2, 0 },
   { false, 0, 0, 0 },
-  
+
   // Stub Helper size and code
   10,
   { 0x68, 0x00, 0x00, 0x00, 0x00,               // pushl $lazy-info-offset
     0xE9, 0x00, 0x00, 0x00, 0x00 },             // jmp helperhelper
   { Reference::KindArch::x86, lazyImmediateLocation, 1, 0 },
   { Reference::KindArch::x86, branch32, 6, 0 },
-  
+
   // Stub Helper-Common size and code
   12,
   { 0x68, 0x00, 0x00, 0x00, 0x00,               // pushl $dyld_ImageLoaderCache
@@ -375,7 +375,7 @@ ArchHandler_x86::getPairReferenceInfo(co
     if (ec)
       return ec;
     if (fromTarget != inAtom) {
-      if (*target != inAtom) 
+      if (*target != inAtom)
         return make_dynamic_error_code(Twine("SECTDIFF relocation where "
                                              "neither target is in atom"));
       *kind = negDelta32;

Modified: lld/trunk/lib/ReaderWriter/MachO/ArchHandler_x86_64.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/MachO/ArchHandler_x86_64.cpp?rev=230192&r1=230191&r2=230192&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/MachO/ArchHandler_x86_64.cpp (original)
+++ lld/trunk/lib/ReaderWriter/MachO/ArchHandler_x86_64.cpp Sun Feb 22 17:54:38 2015
@@ -121,10 +121,10 @@ public:
                                    uint64_t fixupAddress, bool swap,
                                    FindAtomBySectionAndAddress atomFromAddress,
                                    FindAtomBySymbolIndex atomFromSymbolIndex,
-                                   Reference::KindValue *kind, 
-                                   const lld::Atom **target, 
+                                   Reference::KindValue *kind,
+                                   const lld::Atom **target,
                                    Reference::Addend *addend) override;
-  std::error_code 
+  std::error_code
       getPairReferenceInfo(const normalized::Relocation &reloc1,
                            const normalized::Relocation &reloc2,
                            const DefinedAtom *inAtom,
@@ -132,8 +132,8 @@ public:
                            uint64_t fixupAddress, bool swap, bool scatterable,
                            FindAtomBySectionAndAddress atomFromAddress,
                            FindAtomBySymbolIndex atomFromSymbolIndex,
-                           Reference::KindValue *kind, 
-                           const lld::Atom **target, 
+                           Reference::KindValue *kind,
+                           const lld::Atom **target,
                            Reference::Addend *addend) override;
 
   bool needsLocalSymbolInRelocatableFile(const DefinedAtom *atom) override {
@@ -160,7 +160,7 @@ private:
 
   enum X86_64Kind: Reference::KindValue {
     invalid,               /// for error condition
-    
+
     // Kinds found in mach-o .o files:
     branch32,              /// ex: call _foo
     ripRel32,              /// ex: movq _foo(%rip), %rax
@@ -179,7 +179,7 @@ private:
     negDelta32,            /// ex: .long . - _foo
 
     // Kinds introduced by Passes:
-    ripRel32GotLoadNowLea, /// Target of GOT load is in linkage unit so 
+    ripRel32GotLoadNowLea, /// Target of GOT load is in linkage unit so
                            ///  "movq  _foo at GOTPCREL(%rip), %rax" can be changed
                            /// to "leaq _foo(%rip), %rax
     lazyPointer,           /// Location contains a lazy pointer.
@@ -235,29 +235,29 @@ const Registry::KindStrings ArchHandler_
 const ArchHandler::StubInfo ArchHandler_x86_64::_sStubInfo = {
   "dyld_stub_binder",
 
-  // Lazy pointer references 
+  // Lazy pointer references
   { Reference::KindArch::x86_64, pointer64, 0, 0 },
   { Reference::KindArch::x86_64, lazyPointer, 0, 0 },
-  
+
   // GOT pointer to dyld_stub_binder
   { Reference::KindArch::x86_64, pointer64, 0, 0 },
 
   // x86_64 code alignment 2^1
-  1, 
-  
+  1,
+
   // Stub size and code
-  6, 
+  6,
   { 0xff, 0x25, 0x00, 0x00, 0x00, 0x00 },       // jmp *lazyPointer
   { Reference::KindArch::x86_64, ripRel32, 2, 0 },
   { false, 0, 0, 0 },
-  
+
   // Stub Helper size and code
   10,
   { 0x68, 0x00, 0x00, 0x00, 0x00,               // pushq $lazy-info-offset
     0xE9, 0x00, 0x00, 0x00, 0x00 },             // jmp helperhelper
   { Reference::KindArch::x86_64, lazyImmediateLocation, 1, 0 },
   { Reference::KindArch::x86_64, branch32, 6, 0 },
-  
+
   // Stub Helper-Common size and code
   16,
   { 0x4C, 0x8D, 0x1D, 0x00, 0x00, 0x00, 0x00,   // leaq cache(%rip),%r11
@@ -268,7 +268,7 @@ const ArchHandler::StubInfo ArchHandler_
   { false, 0, 0, 0 },
   { Reference::KindArch::x86_64, ripRel32, 11, 0 },
   { false, 0, 0, 0 }
-  
+
 };
 
 bool ArchHandler_x86_64::isCallSite(const Reference &ref) {
@@ -318,15 +318,15 @@ ArchHandler_x86_64::kindFromReloc(const
   }
 }
 
-std::error_code 
+std::error_code
 ArchHandler_x86_64::getReferenceInfo(const Relocation &reloc,
                                     const DefinedAtom *inAtom,
                                     uint32_t offsetInAtom,
                                     uint64_t fixupAddress, bool swap,
                                     FindAtomBySectionAndAddress atomFromAddress,
                                     FindAtomBySymbolIndex atomFromSymbolIndex,
-                                    Reference::KindValue *kind, 
-                                    const lld::Atom **target, 
+                                    Reference::KindValue *kind,
+                                    const lld::Atom **target,
                                     Reference::Addend *addend) {
   typedef std::error_code E;
   *kind = kindFromReloc(reloc);
@@ -408,8 +408,8 @@ ArchHandler_x86_64::getPairReferenceInfo
                                    bool scatterable,
                                    FindAtomBySectionAndAddress atomFromAddress,
                                    FindAtomBySymbolIndex atomFromSymbolIndex,
-                                   Reference::KindValue *kind, 
-                                   const lld::Atom **target, 
+                                   Reference::KindValue *kind,
+                                   const lld::Atom **target,
                                    Reference::Addend *addend) {
   *kind = kindFromRelocPair(reloc1, reloc2);
   if (*kind == invalid)

Modified: lld/trunk/lib/ReaderWriter/MachO/File.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/MachO/File.h?rev=230192&r1=230191&r2=230192&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/MachO/File.h (original)
+++ lld/trunk/lib/ReaderWriter/MachO/File.h Sun Feb 22 17:54:38 2015
@@ -115,7 +115,7 @@ public:
     addAtom(*atom);
     _undefAtoms[name] = atom;
   }
-  
+
   /// Search this file for an the atom from 'section' that covers
   /// 'offsetInSect'.  Returns nullptr is no atom found.
   MachODefinedAtom *findAtomCoveringAddress(const Section &section,
@@ -128,7 +128,7 @@ public:
     assert(offsetInSect < section.content.size());
     // Vector of atoms for section are already sorted, so do binary search.
     const auto &atomPos = std::lower_bound(vec.begin(), vec.end(), offsetInSect,
-        [offsetInSect](const SectionOffsetAndAtom &ao, 
+        [offsetInSect](const SectionOffsetAndAtom &ao,
                        uint64_t targetAddr) -> bool {
           // Each atom has a start offset of its slice of the
           // section's content. This compare function must return true
@@ -151,7 +151,7 @@ public:
       return nullptr;
     return pos->second;
   }
-  
+
   typedef std::function<void (MachODefinedAtom* atom)> DefinedAtomVisitor;
 
   void eachDefinedAtom(DefinedAtomVisitor vistor) {
@@ -187,11 +187,11 @@ protected:
       return ec;
     return std::error_code();
   }
-  
+
 private:
   struct SectionOffsetAndAtom { uint64_t offset;  MachODefinedAtom *atom; };
 
-  void addAtomForSection(const Section *inSection, MachODefinedAtom* atom, 
+  void addAtomForSection(const Section *inSection, MachODefinedAtom* atom,
                          uint64_t sectionOffset) {
     SectionOffsetAndAtom offAndAtom;
     offAndAtom.offset = sectionOffset;
@@ -200,8 +200,8 @@ private:
     addAtom(*atom);
   }
 
-  
-  typedef llvm::DenseMap<const normalized::Section *, 
+
+  typedef llvm::DenseMap<const normalized::Section *,
                          std::vector<SectionOffsetAndAtom>>  SectionToAtoms;
   typedef llvm::StringMap<const lld::Atom *> NameToAtom;
 

Modified: lld/trunk/lib/ReaderWriter/MachO/GOTPass.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/MachO/GOTPass.cpp?rev=230192&r1=230191&r2=230192&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/MachO/GOTPass.cpp (original)
+++ lld/trunk/lib/ReaderWriter/MachO/GOTPass.cpp Sun Feb 22 17:54:38 2015
@@ -88,12 +88,12 @@ private:
 
 
 /// Pass for instantiating and optimizing GOT slots.
-/// 
+///
 class GOTPass : public Pass {
 public:
   GOTPass(const MachOLinkingContext &context)
     : _context(context), _archHandler(_context.archHandler()),
-      _file("<mach-o GOT Pass>") { } 
+      _file("<mach-o GOT Pass>") { }
 
 private:
 
@@ -150,11 +150,11 @@ private:
     // by-passed, do that optimization and don't create GOT entry.
     return !canBypassGOT;
   }
-  
+
   const DefinedAtom *makeGOTEntry(const Atom *target) {
     auto pos = _targetToGOT.find(target);
     if (pos == _targetToGOT.end()) {
-      GOTEntryAtom *gotEntry = new (_file.allocator()) 
+      GOTEntryAtom *gotEntry = new (_file.allocator())
           GOTEntryAtom(_file, _context.is64Bit(), target->name());
       _targetToGOT[target] = gotEntry;
       const ArchHandler::ReferenceInfo &nlInfo = _archHandler.stubInfo().
@@ -166,7 +166,7 @@ private:
     return pos->second;
   }
 
-  
+
   const MachOLinkingContext                       &_context;
   mach_o::ArchHandler                             &_archHandler;
   MachOFile                                        _file;
@@ -179,7 +179,7 @@ void addGOTPass(PassManager &pm, const M
   assert(ctx.needsGOTPass());
   pm.add(llvm::make_unique<GOTPass>(ctx));
 }
-  
+
 
 } // end namesapce mach_o
 } // end namesapce lld

Modified: lld/trunk/lib/ReaderWriter/MachO/MachONormalizedFileBinaryReader.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/MachO/MachONormalizedFileBinaryReader.cpp?rev=230192&r1=230191&r2=230192&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/MachO/MachONormalizedFileBinaryReader.cpp (original)
+++ lld/trunk/lib/ReaderWriter/MachO/MachONormalizedFileBinaryReader.cpp Sun Feb 22 17:54:38 2015
@@ -572,7 +572,7 @@ void Registry::addSupportMachOObjects(Ma
   MachOLinkingContext::Arch arch = ctx.arch();
   add(std::unique_ptr<Reader>(new mach_o::normalized::MachOObjectReader(ctx)));
   add(std::unique_ptr<Reader>(new mach_o::normalized::MachODylibReader(ctx)));
-  addKindTable(Reference::KindNamespace::mach_o, ctx.archHandler().kindArch(), 
+  addKindTable(Reference::KindNamespace::mach_o, ctx.archHandler().kindArch(),
                ctx.archHandler().kindStrings());
   add(std::unique_ptr<YamlIOTaggedDocumentHandler>(
                            new mach_o::MachOYamlIOTaggedDocumentHandler(arch)));

Modified: lld/trunk/lib/ReaderWriter/MachO/MachONormalizedFileFromAtoms.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/MachO/MachONormalizedFileFromAtoms.cpp?rev=230192&r1=230191&r2=230192&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/MachO/MachONormalizedFileFromAtoms.cpp (original)
+++ lld/trunk/lib/ReaderWriter/MachO/MachONormalizedFileFromAtoms.cpp Sun Feb 22 17:54:38 2015
@@ -206,7 +206,7 @@ SectionInfo *Util::getRelocatableSection
     }
   }
   // Otherwise allocate new SectionInfo object.
-  SectionInfo *sect = new (_allocator) SectionInfo(segmentName, sectionName, 
+  SectionInfo *sect = new (_allocator) SectionInfo(segmentName, sectionName,
                                                    sectionType, _context,
                                                    sectionAttrs);
   _sectionInfos.push_back(sect);

Modified: lld/trunk/lib/ReaderWriter/MachO/MachONormalizedFileToAtoms.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/MachO/MachONormalizedFileToAtoms.cpp?rev=230192&r1=230191&r2=230192&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/MachO/MachONormalizedFileToAtoms.cpp (original)
+++ lld/trunk/lib/ReaderWriter/MachO/MachONormalizedFileToAtoms.cpp Sun Feb 22 17:54:38 2015
@@ -138,39 +138,39 @@ void sectionParseInfo(DefinedAtom::Conte
     {DefinedAtom::type, size, DefinedAtom::scope, DefinedAtom::merge, model }
 
   static const ParseInfo parseInfo[] = {
-    ENTRY(typeCode,              1, scopeGlobal,          mergeNo, 
+    ENTRY(typeCode,              1, scopeGlobal,          mergeNo,
                                                             atomizeAtSymbols),
-    ENTRY(typeData,              1, scopeGlobal,          mergeNo, 
+    ENTRY(typeData,              1, scopeGlobal,          mergeNo,
                                                             atomizeAtSymbols),
-    ENTRY(typeConstData,         1, scopeGlobal,          mergeNo, 
+    ENTRY(typeConstData,         1, scopeGlobal,          mergeNo,
                                                             atomizeAtSymbols),
-    ENTRY(typeZeroFill,          1, scopeGlobal,          mergeNo, 
+    ENTRY(typeZeroFill,          1, scopeGlobal,          mergeNo,
                                                             atomizeAtSymbols),
-    ENTRY(typeConstant,          1, scopeGlobal,          mergeNo, 
+    ENTRY(typeConstant,          1, scopeGlobal,          mergeNo,
                                                             atomizeAtSymbols),
-    ENTRY(typeCString,           1, scopeLinkageUnit,     mergeByContent, 
+    ENTRY(typeCString,           1, scopeLinkageUnit,     mergeByContent,
                                                             atomizeUTF8),
-    ENTRY(typeUTF16String,       1, scopeLinkageUnit,     mergeByContent, 
+    ENTRY(typeUTF16String,       1, scopeLinkageUnit,     mergeByContent,
                                                             atomizeUTF16),
     ENTRY(typeCFI,               4, scopeTranslationUnit, mergeNo,
                                                             atomizeCFI),
-    ENTRY(typeLiteral4,          4, scopeLinkageUnit,     mergeByContent, 
+    ENTRY(typeLiteral4,          4, scopeLinkageUnit,     mergeByContent,
                                                             atomizeFixedSize),
-    ENTRY(typeLiteral8,          8, scopeLinkageUnit,     mergeByContent, 
+    ENTRY(typeLiteral8,          8, scopeLinkageUnit,     mergeByContent,
                                                             atomizeFixedSize),
-    ENTRY(typeLiteral16,        16, scopeLinkageUnit,     mergeByContent, 
+    ENTRY(typeLiteral16,        16, scopeLinkageUnit,     mergeByContent,
                                                             atomizeFixedSize),
-    ENTRY(typeCFString,          4, scopeLinkageUnit,     mergeByContent, 
+    ENTRY(typeCFString,          4, scopeLinkageUnit,     mergeByContent,
                                                             atomizeCFString),
-    ENTRY(typeInitializerPtr,    4, scopeTranslationUnit, mergeNo, 
+    ENTRY(typeInitializerPtr,    4, scopeTranslationUnit, mergeNo,
                                                             atomizePointerSize),
-    ENTRY(typeTerminatorPtr,     4, scopeTranslationUnit, mergeNo, 
+    ENTRY(typeTerminatorPtr,     4, scopeTranslationUnit, mergeNo,
                                                             atomizePointerSize),
-    ENTRY(typeCompactUnwindInfo, 4, scopeTranslationUnit, mergeNo, 
+    ENTRY(typeCompactUnwindInfo, 4, scopeTranslationUnit, mergeNo,
                                                             atomizeCU),
-    ENTRY(typeGOT,               4, scopeLinkageUnit,     mergeByContent, 
+    ENTRY(typeGOT,               4, scopeLinkageUnit,     mergeByContent,
                                                             atomizePointerSize),
-    ENTRY(typeUnknown,           1, scopeGlobal,          mergeNo, 
+    ENTRY(typeUnknown,           1, scopeGlobal,          mergeNo,
                                                             atomizeAtSymbols)
   };
   #undef ENTRY
@@ -300,8 +300,8 @@ std::error_code processSymboledSection(D
 
   // Debug logging of symbols.
   //for (const Symbol *sym : symbols)
-  //  llvm::errs() << "  sym: " 
-  //    << llvm::format("0x%08llx ", (uint64_t)sym->value) 
+  //  llvm::errs() << "  sym: "
+  //    << llvm::format("0x%08llx ", (uint64_t)sym->value)
   //    << ", " << sym->name << "\n";
 
   // If section has no symbols and no content, there are no atoms.
@@ -622,7 +622,7 @@ std::error_code convertRelocs(const Sect
          + ")" );
     } else {
       // Instantiate an lld::Reference object and add to its atom.
-      inAtom->addReference(offsetInAtom, kind, target, addend, 
+      inAtom->addReference(offsetInAtom, kind, target, addend,
                            handler.kindArch());
     }
   }

Modified: lld/trunk/lib/ReaderWriter/MachO/StubsPass.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/MachO/StubsPass.cpp?rev=230192&r1=230191&r2=230192&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/MachO/StubsPass.cpp (original)
+++ lld/trunk/lib/ReaderWriter/MachO/StubsPass.cpp Sun Feb 22 17:54:38 2015
@@ -36,7 +36,7 @@ namespace mach_o {
 //
 class LazyPointerAtom : public SimpleDefinedAtom {
 public:
-  LazyPointerAtom(const File &file, bool is64) 
+  LazyPointerAtom(const File &file, bool is64)
     : SimpleDefinedAtom(file), _is64(is64) { }
 
   ContentType contentType() const override {
@@ -71,7 +71,7 @@ private:
 //
 class NonLazyPointerAtom : public SimpleDefinedAtom {
 public:
-  NonLazyPointerAtom(const File &file, bool is64) 
+  NonLazyPointerAtom(const File &file, bool is64)
     : SimpleDefinedAtom(file), _is64(is64) { }
 
   ContentType contentType() const override {
@@ -160,7 +160,7 @@ public:
   }
 
   ArrayRef<uint8_t> rawContent() const override {
-    return llvm::makeArrayRef(_stubInfo.stubHelperBytes, 
+    return llvm::makeArrayRef(_stubInfo.stubHelperBytes,
                               _stubInfo.stubHelperSize);
   }
 
@@ -194,7 +194,7 @@ public:
   }
 
   ArrayRef<uint8_t> rawContent() const override {
-    return llvm::makeArrayRef(_stubInfo.stubHelperCommonBytes, 
+    return llvm::makeArrayRef(_stubInfo.stubHelperCommonBytes,
                         _stubInfo.stubHelperCommonSize);
   }
 
@@ -214,7 +214,7 @@ public:
     // Skip this pass if output format uses text relocations instead of stubs.
     if (!this->noTextRelocs())
       return;
-    
+
     // Scan all references in all atoms.
     for (const DefinedAtom *atom : mergedFile->defined()) {
       for (const Reference *ref : *atom) {
@@ -329,7 +329,7 @@ private:
   bool isCallSite(const Reference &ref) {
     return _archHandler.isCallSite(ref);
   }
- 
+
   void addReference(SimpleDefinedAtom* atom,
                     const ArchHandler::ReferenceInfo &refInfo,
                     const lld::Atom* target) {

Modified: lld/trunk/test/LinkerScript/sections.test
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/LinkerScript/sections.test?rev=230192&r1=230191&r2=230192&view=diff
==============================================================================
--- lld/trunk/test/LinkerScript/sections.test (original)
+++ lld/trunk/test/LinkerScript/sections.test Sun Feb 22 17:54:38 2015
@@ -521,7 +521,7 @@ CHECK: identifier: .gnu.lto_*
 CHECK: r_paren: )
 CHECK: r_brace: }
 CHECK: r_brace: }
-CHECK: eof: 
+CHECK: eof:
 CHECK: SEARCH_DIR("/usr/x86_64-linux-gnu/lib64")
 CHECK: SEARCH_DIR("=/usr/local/lib/x86_64-linux-gnu")
 CHECK: SECTIONS
@@ -529,52 +529,52 @@ CHECK: {
 CHECK: PROVIDE(__executable_start = SEGMENT_START(text-segment, 4194304))
 CHECK: . = (SEGMENT_START(text-segment, 4194304) + SIZEOF_HEADERS)
 CHECK: .interp :
-CHECK:   { 
+CHECK:   {
 CHECK:     *(.interp)
 CHECK:   }
 CHECK: .note.gnu.build-id :
-CHECK:   { 
+CHECK:   {
 CHECK:     *(.note.gnu.build-id)
 CHECK:   }
 CHECK: .hash :
-CHECK:   { 
+CHECK:   {
 CHECK:     *(.hash)
 CHECK:   }
 CHECK: .rela.dyn :
-CHECK:   { 
+CHECK:   {
 CHECK:     *(.rela.init)
 CHECK:     *(.rela.text .rela.text.* .rela.gnu.linkonce.t.*)
 CHECK:     *(.rela.fini)
 CHECK:     *(.rela.rodata .rela.rodata.* .rela.gnu.linkonce.r.*)
 CHECK:   }
 CHECK: .rela.plt :
-CHECK:   { 
+CHECK:   {
 CHECK:     *(.rela.plt)
 CHECK:     PROVIDE_HIDDEN(__rela_iplt_start = .)
 CHECK:     *(.rela.iplt)
 CHECK:     PROVIDE_HIDDEN(__rela_iplt_end = .)
 CHECK:   }
 CHECK: .init :
-CHECK:   { 
+CHECK:   {
 CHECK:     KEEP(*(SORT_NONE(.init)))
 CHECK:   } =0x909090909090909090909090
 CHECK: PROVIDE(__etext = .)
 CHECK: .eh_frame :
-CHECK: ONLY_IF_RO  { 
+CHECK: ONLY_IF_RO  {
 CHECK:     KEEP(*(.eh_frame))
 CHECK:   }
 CHECK: .exception_ranges :
-CHECK: ONLY_IF_RO  { 
+CHECK: ONLY_IF_RO  {
 CHECK:     *(.exception_ranges .exception_ranges*)
 CHECK:   }
 CHECK: . = (ALIGN(CONSTANT(MAXPAGESIZE)) - ((CONSTANT(MAXPAGESIZE) - .) & (CONSTANT(MAXPAGESIZE) - 1)))
 CHECK: . = DATA_SEGMENT_ALIGN(CONSTANT(MAXPAGESIZE), CONSTANT(COMMONPAGESIZE))
 CHECK: .eh_frame :
-CHECK: ONLY_IF_RW  { 
+CHECK: ONLY_IF_RW  {
 CHECK:     KEEP(*(.eh_frame))
 CHECK:   }
 CHECK: .ctors :
-CHECK:   { 
+CHECK:   {
 CHECK:     KEEP(*crtbegin.o(.ctors))
 CHECK:     KEEP(*crtbegin?.o(.ctors))
 CHECK:     KEEP(*(EXCLUDE_FILE(*crtend.o *crtend?.o ) .ctors))
@@ -582,7 +582,7 @@ CHECK:     KEEP(*(SORT_BY_NAME(.ctors.*)
 CHECK:     KEEP(*(.ctors))
 CHECK:   }
 CHECK: .dtors :
-CHECK:   { 
+CHECK:   {
 CHECK:     KEEP(*crtbegin.o(.dtors))
 CHECK:     KEEP(*crtbegin?.o(.dtors))
 CHECK:     KEEP(*(EXCLUDE_FILE(*crtend.o *crtend?.o ) .dtors))
@@ -591,16 +591,16 @@ CHECK:     KEEP(*(.dtors))
 CHECK:   }
 CHECK: . = DATA_SEGMENT_RELRO_END((SIZEOF(.got.plt) >= 24) ? 24 : 0, .)
 CHECK: .got.plt :
-CHECK:   { 
+CHECK:   {
 CHECK:     *(.got.plt)
 CHECK:     *(.igot.plt)
 CHECK:   }
 CHECK: .lrodata (ALIGN(CONSTANT(MAXPAGESIZE)) + (. & (CONSTANT(MAXPAGESIZE) - 1))) :
-CHECK:   { 
+CHECK:   {
 CHECK:     *(.lrodata .lrodata.* .gnu.linkonce.lr.*)
 CHECK:   }
 CHECK: .ldata (ALIGN(CONSTANT(MAXPAGESIZE)) + (. & (CONSTANT(MAXPAGESIZE) - 1))) :
-CHECK:   { 
+CHECK:   {
 CHECK:     *(.ldata .ldata.* .gnu.linkonce.l.*)
 CHECK:     . = ALIGN((. != 0) ? (64 / 8) : 1)
 CHECK:   }
@@ -609,7 +609,7 @@ CHECK: _end = .
 CHECK: PROVIDE(end = .)
 CHECK: . = DATA_SEGMENT_END(.)
 CHECK:  :
-CHECK:   { 
+CHECK:   {
 CHECK:     *(.note.GNU-stack)
 CHECK:     *(.gnu_debuglink)
 CHECK:     *(.gnu.lto_*)

Modified: lld/trunk/test/elf/Mips/exe-dynamic.test
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf/Mips/exe-dynamic.test?rev=230192&r1=230191&r2=230192&view=diff
==============================================================================
--- lld/trunk/test/elf/Mips/exe-dynamic.test (original)
+++ lld/trunk/test/elf/Mips/exe-dynamic.test Sun Feb 22 17:54:38 2015
@@ -25,7 +25,7 @@
 # CHECK-NEXT:  0x00000014 PLTREL               REL
 # CHECK-NEXT:  0x00000017 JMPREL               0x400154
 # CHECK-NEXT:  0x70000001 MIPS_RLD_VERSION     1
-# CHECK-NEXT:  0x70000005 MIPS_FLAGS           NOTPOT 
+# CHECK-NEXT:  0x70000005 MIPS_FLAGS           NOTPOT
 # CHECK-NEXT:  0x70000006 MIPS_BASE_ADDRESS    0x400000
 # CHECK-NEXT:  0x7000000A MIPS_LOCAL_GOTNO     2
 # CHECK-NEXT:  0x70000011 MIPS_SYMTABNO        2

Modified: lld/trunk/test/elf/Mips/gp-sym-1.test
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf/Mips/gp-sym-1.test?rev=230192&r1=230191&r2=230192&view=diff
==============================================================================
--- lld/trunk/test/elf/Mips/gp-sym-1.test (original)
+++ lld/trunk/test/elf/Mips/gp-sym-1.test Sun Feb 22 17:54:38 2015
@@ -13,7 +13,7 @@
 # SEC:      Contents of section .text:
 # SEC-NEXT:  400190 41000000 f08f0000 60001000
 # SEC:      Contents of section .got:
-# SEC-NEXT:  401000 00000000 00000080        
+# SEC-NEXT:  401000 00000000 00000080
 
 # so.o
 ---

Modified: lld/trunk/test/elf/Mips/tls-4.test
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf/Mips/tls-4.test?rev=230192&r1=230191&r2=230192&view=diff
==============================================================================
--- lld/trunk/test/elf/Mips/tls-4.test (original)
+++ lld/trunk/test/elf/Mips/tls-4.test Sun Feb 22 17:54:38 2015
@@ -28,7 +28,7 @@
 
 # so1.o
 ---
-FileHeader:      
+FileHeader:
   Class:           ELFCLASS32
   Data:            ELFDATA2LSB
   OSABI:           ELFOSABI_GNU
@@ -36,7 +36,7 @@ FileHeader:
   Machine:         EM_MIPS
   Flags:           [ EF_MIPS_NOREORDER, EF_MIPS_PIC, EF_MIPS_CPIC,
                      EF_MIPS_ABI_O32, EF_MIPS_ARCH_32R2 ]
-Sections:        
+Sections:
   - Name:            .text
     Type:            SHT_PROGBITS
     Flags:           [ SHF_ALLOC, SHF_EXECINSTR ]
@@ -47,7 +47,7 @@ Sections:
     Link:            .symtab
     AddressAlign:    0x04
     Info:            .text
-    Relocations:     
+    Relocations:
       - Offset:          0x00
         Symbol:          L01
         Type:            R_MIPS_TLS_LDM
@@ -60,13 +60,13 @@ Sections:
     AddressAlign:    0x04
     Size:            0x04
 
-Symbols:         
-  Local:           
+Symbols:
+  Local:
     - Name:            L01
       Type:            STT_TLS
       Section:         .tdata
       Size:            0x04
-  Global:          
+  Global:
     - Name:            T1
       Type:            STT_FUNC
       Section:         .text
@@ -80,7 +80,7 @@ Symbols:
 
 # so2.o
 ---
-FileHeader:      
+FileHeader:
   Class:           ELFCLASS32
   Data:            ELFDATA2LSB
   OSABI:           ELFOSABI_GNU
@@ -88,7 +88,7 @@ FileHeader:
   Machine:         EM_MIPS
   Flags:           [ EF_MIPS_NOREORDER, EF_MIPS_PIC, EF_MIPS_CPIC,
                      EF_MIPS_ABI_O32, EF_MIPS_ARCH_32R2 ]
-Sections:        
+Sections:
   - Name:            .text
     Type:            SHT_PROGBITS
     Flags:           [ SHF_ALLOC, SHF_EXECINSTR ]
@@ -99,7 +99,7 @@ Sections:
     Link:            .symtab
     AddressAlign:    0x04
     Info:            .text
-    Relocations:     
+    Relocations:
       - Offset:          0x00
         Symbol:          L02
         Type:            R_MIPS_TLS_LDM
@@ -109,13 +109,13 @@ Sections:
     AddressAlign:    0x04
     Size:            0x04
 
-Symbols:         
-  Local:           
+Symbols:
+  Local:
     - Name:            L02
       Type:            STT_TLS
       Section:         .tdata
       Size:            0x04
-  Global:          
+  Global:
     - Name:            T3
       Type:            STT_FUNC
       Section:         .text

Modified: lld/trunk/test/elf/consecutive-weak-sym-defs.test
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf/consecutive-weak-sym-defs.test?rev=230192&r1=230191&r2=230192&view=diff
==============================================================================
--- lld/trunk/test/elf/consecutive-weak-sym-defs.test (original)
+++ lld/trunk/test/elf/consecutive-weak-sym-defs.test Sun Feb 22 17:54:38 2015
@@ -24,7 +24,7 @@
 #CHECKLAYOUT-NEXT:  AddressAlign:
 #CHECKLAYOUT-NEXT:  Content: 554889E5E8020000005DC3554889E5B8640000005DC3
 #                            ^~~> my_func          ^~~> my_weak_func
-#      
+#
 #
 #
 #Our two input files were produced by the following code:
@@ -43,7 +43,7 @@
 #         retq
 # .Ltmp0:
 #         .size   my_func, .Ltmp0-my_func
-# 
+#
 #         .text
 #         .weak   my_weak_func
 #         .type   my_weak_func, at function
@@ -62,16 +62,16 @@
 # .Ltmp1:
 #         .size   my_weak_func, .Ltmp1-my_weak_func
 #         .size   my_weak_func2, .Ltmp1-my_weak_func2
-#         .size   my_weak_func3, .Ltmp1-my_weak_func3 
-# 
+#         .size   my_weak_func3, .Ltmp1-my_weak_func3
+#
 #Inputs/main-with-global-def.o.yaml:
 #
 # int my_func();
-# 
+#
 # int my_weak_func2() {
 #     return 200;
 # }
-# 
+#
 # int main() {
 #     return my_func();
 # }

Modified: lld/trunk/test/elf/export-dynamic.test
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf/export-dynamic.test?rev=230192&r1=230191&r2=230192&view=diff
==============================================================================
--- lld/trunk/test/elf/export-dynamic.test (original)
+++ lld/trunk/test/elf/export-dynamic.test Sun Feb 22 17:54:38 2015
@@ -30,13 +30,13 @@
 #   return mysecretfunc() + mysecretvar;
 # }
 ---
-FileHeader:      
+FileHeader:
   Class:           ELFCLASS64
   Data:            ELFDATA2LSB
   OSABI:           ELFOSABI_GNU
   Type:            ET_REL
   Machine:         EM_X86_64
-Sections:        
+Sections:
   - Name:            .text
     Type:            SHT_PROGBITS
     Flags:           [ SHF_ALLOC, SHF_EXECINSTR ]
@@ -47,7 +47,7 @@ Sections:
     Link:            .symtab
     AddressAlign:    0x0000000000000008
     Info:            .text
-    Relocations:     
+    Relocations:
       - Offset:          0x0000000000000027
         Symbol:          .data
         Type:            R_X86_64_32S
@@ -62,8 +62,8 @@ Sections:
     Flags:           [ SHF_WRITE, SHF_ALLOC ]
     AddressAlign:    0x0000000000000004
     Content:         ''
-Symbols:         
-  Local:           
+Symbols:
+  Local:
     - Name:            mysecretfunc
       Type:            STT_FUNC
       Section:         .text
@@ -83,7 +83,7 @@ Symbols:
     - Name:            .bss
       Type:            STT_SECTION
       Section:         .bss
-  Global:          
+  Global:
     - Name:            main
       Type:            STT_FUNC
       Section:         .text





More information about the llvm-commits mailing list