[lld] r194677 - Fix indentation and delete trailing whitespace.
Rui Ueyama
ruiu at google.com
Wed Nov 13 22:58:32 PST 2013
Author: ruiu
Date: Thu Nov 14 00:58:32 2013
New Revision: 194677
URL: http://llvm.org/viewvc/llvm-project?rev=194677&view=rev
Log:
Fix indentation and delete trailing whitespace.
Modified:
lld/trunk/lib/ReaderWriter/MachO/StubAtoms_x86.hpp
Modified: lld/trunk/lib/ReaderWriter/MachO/StubAtoms_x86.hpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/MachO/StubAtoms_x86.hpp?rev=194677&r1=194676&r2=194677&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/MachO/StubAtoms_x86.hpp (original)
+++ lld/trunk/lib/ReaderWriter/MachO/StubAtoms_x86.hpp Thu Nov 14 00:58:32 2013
@@ -29,12 +29,12 @@ namespace mach_o {
//
class X86StubAtom : public SimpleDefinedAtom {
public:
- X86StubAtom(const File &file, const Atom &lazyPointer)
- : SimpleDefinedAtom(file) {
- this->addReference(KindHandler_x86::abs32, 2, &lazyPointer, 0);
- }
+ X86StubAtom(const File &file, const Atom &lazyPointer)
+ : SimpleDefinedAtom(file) {
+ this->addReference(KindHandler_x86::abs32, 2, &lazyPointer, 0);
+ }
- virtual ContentType contentType() const {
+ virtual ContentType contentType() const {
return DefinedAtom::typeStub;
}
@@ -42,17 +42,16 @@ public:
return 6;
}
- virtual ContentPermissions permissions() const {
+ virtual ContentPermissions permissions() const {
return DefinedAtom::permR_X;
}
virtual ArrayRef<uint8_t> rawContent() const {
static const uint8_t instructions[] =
- { 0xFF, 0x25, 0x00, 0x00, 0x00, 0x00 }; // jmp *lazyPointer
+ { 0xFF, 0x25, 0x00, 0x00, 0x00, 0x00 }; // jmp *lazyPointer
assert(sizeof(instructions) == this->size());
return makeArrayRef(instructions);
}
-
};
@@ -62,13 +61,13 @@ public:
class X86StubHelperCommonAtom : public SimpleDefinedAtom {
public:
X86StubHelperCommonAtom(const File &file, const Atom &cache,
- const Atom &binder)
- : SimpleDefinedAtom(file) {
+ const Atom &binder)
+ : SimpleDefinedAtom(file) {
this->addReference(KindHandler_x86::abs32, 1, &cache, 0);
this->addReference(KindHandler_x86::abs32, 7, &binder, 0);
}
- virtual ContentType contentType() const {
+ virtual ContentType contentType() const {
return DefinedAtom::typeStubHelper;
}
@@ -76,35 +75,33 @@ public:
return 12;
}
- virtual ContentPermissions permissions() const {
+ virtual ContentPermissions permissions() const {
return DefinedAtom::permR_X;
}
virtual ArrayRef<uint8_t> rawContent() const {
static const uint8_t instructions[] =
- { 0x68, 0x00, 0x00, 0x00, 0x00, // pushl $dyld_ImageLoaderCache
- 0xFF, 0x25, 0x00, 0x00, 0x00, 0x00, // jmp *_fast_lazy_bind
- 0x90 }; // nop
+ { 0x68, 0x00, 0x00, 0x00, 0x00, // pushl $dyld_ImageLoaderCache
+ 0xFF, 0x25, 0x00, 0x00, 0x00, 0x00, // jmp *_fast_lazy_bind
+ 0x90 }; // nop
assert(sizeof(instructions) == this->size());
return makeArrayRef(instructions);
}
-
};
-
//
// X86 Stub Helper Atom created by the stubs pass.
//
class X86StubHelperAtom : public SimpleDefinedAtom {
public:
X86StubHelperAtom(const File &file, const Atom &helperCommon)
- : SimpleDefinedAtom(file) {
+ : SimpleDefinedAtom(file) {
this->addReference(KindHandler_x86::lazyImmediate, 1, this, 0);
this->addReference(KindHandler_x86::branch32, 6, &helperCommon, 0);
}
- virtual ContentType contentType() const {
+ virtual ContentType contentType() const {
return DefinedAtom::typeStubHelper;
}
@@ -112,18 +109,17 @@ public:
return 10;
}
- virtual ContentPermissions permissions() const {
+ virtual ContentPermissions permissions() const {
return DefinedAtom::permR_X;
}
virtual ArrayRef<uint8_t> rawContent() const {
static const uint8_t instructions[] =
- { 0x68, 0x00, 0x00, 0x00, 0x00, // pushq $lazy-info-offset
- 0xE9, 0x00, 0x00, 0x00, 0x00 }; // jmp helperhelper
+ { 0x68, 0x00, 0x00, 0x00, 0x00, // pushq $lazy-info-offset
+ 0xE9, 0x00, 0x00, 0x00, 0x00 }; // jmp helperhelper
assert(sizeof(instructions) == this->size());
return makeArrayRef(instructions);
}
-
};
@@ -132,26 +128,25 @@ public:
//
class X86LazyPointerAtom : public SimpleDefinedAtom {
public:
- X86LazyPointerAtom(const File &file, const Atom &helper,
- const Atom &shlib)
- : SimpleDefinedAtom(file) {
- this->addReference(KindHandler_x86::pointer32, 0, &helper, 0);
- this->addReference(KindHandler_x86::lazyTarget, 0, &shlib, 0);
- }
+ X86LazyPointerAtom(const File &file, const Atom &helper, const Atom &shlib)
+ : SimpleDefinedAtom(file) {
+ this->addReference(KindHandler_x86::pointer32, 0, &helper, 0);
+ this->addReference(KindHandler_x86::lazyTarget, 0, &shlib, 0);
+ }
- virtual ContentType contentType() const {
+ virtual ContentType contentType() const {
return DefinedAtom::typeLazyPointer;
}
- virtual Alignment alignment() const {
- return Alignment(2);
+ virtual Alignment alignment() const {
+ return Alignment(2);
}
-
+
virtual uint64_t size() const {
return 4;
}
- virtual ContentPermissions permissions() const {
+ virtual ContentPermissions permissions() const {
return DefinedAtom::permRW_;
}
@@ -159,7 +154,6 @@ public:
static const uint8_t bytes[] = { 0x00, 0x00, 0x00, 0x00 };
return makeArrayRef(bytes);
}
-
};
@@ -169,27 +163,26 @@ public:
class X86NonLazyPointerAtom : public SimpleDefinedAtom {
public:
X86NonLazyPointerAtom(const File &file)
- : SimpleDefinedAtom(file) {
- }
+ : SimpleDefinedAtom(file) {}
X86NonLazyPointerAtom(const File &file, const Atom &shlib)
- : SimpleDefinedAtom(file) {
+ : SimpleDefinedAtom(file) {
this->addReference(KindHandler_x86::pointer32, 0, &shlib, 0);
}
- virtual ContentType contentType() const {
+ virtual ContentType contentType() const {
return DefinedAtom::typeGOT;
}
- virtual Alignment alignment() const {
- return Alignment(2);
+ virtual Alignment alignment() const {
+ return Alignment(2);
}
-
+
virtual uint64_t size() const {
return 4;
}
- virtual ContentPermissions permissions() const {
+ virtual ContentPermissions permissions() const {
return DefinedAtom::permRW_;
}
@@ -197,11 +190,8 @@ public:
static const uint8_t bytes[] = { 0x00, 0x00, 0x00, 0x0 };
return makeArrayRef(bytes);
}
-
};
-
-
} // namespace mach_o
} // namespace lld
More information about the llvm-commits
mailing list