diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2016-07-23 20:48:50 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2016-07-23 20:48:50 +0000 |
commit | 1c98619801a5705c688e683be3ef9d70169a0686 (patch) | |
tree | 8422105cd1a94c368315f2db16b9ac746cf7c000 /COFF/Chunks.h | |
parent | f4f3ce4613680903220815690ad79fc7ba0a2e26 (diff) | |
download | src-1c98619801a5705c688e683be3ef9d70169a0686.tar.gz src-1c98619801a5705c688e683be3ef9d70169a0686.zip |
Vendor import of lld release_39 branch r276489:vendor/lld/lld-release_39-r276489
Notes
Notes:
svn path=/vendor/lld/dist/; revision=303239
svn path=/vendor/lld/lld-release_39-r276489/; revision=303240; tag=vendor/lld/lld-release_39-r276489
Diffstat (limited to 'COFF/Chunks.h')
-rw-r--r-- | COFF/Chunks.h | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/COFF/Chunks.h b/COFF/Chunks.h index 274135516eb9..cd0e2e69ef5d 100644 --- a/COFF/Chunks.h +++ b/COFF/Chunks.h @@ -18,6 +18,7 @@ #include "llvm/ADT/iterator_range.h" #include "llvm/Object/COFF.h" #include <atomic> +#include <utility> #include <vector> namespace lld { @@ -138,6 +139,7 @@ public: SectionChunk(ObjectFile *File, const coff_section *Header); static bool classof(const Chunk *C) { return C->kind() == SectionKind; } size_t getSize() const override { return Header->SizeOfRawData; } + ArrayRef<uint8_t> getContents() const; void writeTo(uint8_t *Buf) const override; bool hasData() const override; uint32_t getPermissions() const override; @@ -186,8 +188,6 @@ public: uint32_t Checksum = 0; private: - ArrayRef<uint8_t> getContents() const; - // A file this chunk was created from. ObjectFile *File; @@ -295,7 +295,7 @@ private: // functions. x86-only. class SEHTableChunk : public Chunk { public: - explicit SEHTableChunk(std::set<Defined *> S) : Syms(S) {} + explicit SEHTableChunk(std::set<Defined *> S) : Syms(std::move(S)) {} size_t getSize() const override { return Syms.size() * 4; } void writeTo(uint8_t *Buf) const override; @@ -326,10 +326,6 @@ public: uint8_t Type; }; -inline uint64_t align(uint64_t Value, uint64_t Align) { - return llvm::RoundUpToAlignment(Value, Align); -} - } // namespace coff } // namespace lld |