diff options
author | shadchin <shadchin@yandex-team.ru> | 2022-02-10 16:44:39 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:44:39 +0300 |
commit | e9656aae26e0358d5378e5b63dcac5c8dbe0e4d0 (patch) | |
tree | 64175d5cadab313b3e7039ebaa06c5bc3295e274 /contrib/libs/llvm12/include/llvm/Object/COFF.h | |
parent | 2598ef1d0aee359b4b6d5fdd1758916d5907d04f (diff) | |
download | ydb-e9656aae26e0358d5378e5b63dcac5c8dbe0e4d0.tar.gz |
Restoring authorship annotation for <shadchin@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'contrib/libs/llvm12/include/llvm/Object/COFF.h')
-rw-r--r-- | contrib/libs/llvm12/include/llvm/Object/COFF.h | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/contrib/libs/llvm12/include/llvm/Object/COFF.h b/contrib/libs/llvm12/include/llvm/Object/COFF.h index 4c62889569..816a078cfc 100644 --- a/contrib/libs/llvm12/include/llvm/Object/COFF.h +++ b/contrib/libs/llvm12/include/llvm/Object/COFF.h @@ -583,22 +583,22 @@ struct coff_tls_directory { uint32_t getAlignment() const { // Bit [20:24] contains section alignment. - uint32_t Shift = (Characteristics & COFF::IMAGE_SCN_ALIGN_MASK) >> 20; + uint32_t Shift = (Characteristics & COFF::IMAGE_SCN_ALIGN_MASK) >> 20; if (Shift > 0) return 1U << (Shift - 1); return 0; } - - void setAlignment(uint32_t Align) { - uint32_t AlignBits = 0; - if (Align) { - assert(llvm::isPowerOf2_32(Align) && "alignment is not a power of 2"); - assert(llvm::Log2_32(Align) <= 13 && "alignment requested is too large"); - AlignBits = (llvm::Log2_32(Align) + 1) << 20; - } - Characteristics = - (Characteristics & ~COFF::IMAGE_SCN_ALIGN_MASK) | AlignBits; - } + + void setAlignment(uint32_t Align) { + uint32_t AlignBits = 0; + if (Align) { + assert(llvm::isPowerOf2_32(Align) && "alignment is not a power of 2"); + assert(llvm::Log2_32(Align) <= 13 && "alignment requested is too large"); + AlignBits = (llvm::Log2_32(Align) + 1) << 20; + } + Characteristics = + (Characteristics & ~COFF::IMAGE_SCN_ALIGN_MASK) | AlignBits; + } }; using coff_tls_directory32 = coff_tls_directory<support::little32_t>; @@ -804,8 +804,8 @@ private: const coff_base_reloc_block_header *BaseRelocEnd; const debug_directory *DebugDirectoryBegin; const debug_directory *DebugDirectoryEnd; - const coff_tls_directory32 *TLSDirectory32; - const coff_tls_directory64 *TLSDirectory64; + const coff_tls_directory32 *TLSDirectory32; + const coff_tls_directory64 *TLSDirectory64; // Either coff_load_configuration32 or coff_load_configuration64. const void *LoadConfig = nullptr; @@ -825,7 +825,7 @@ private: Error initExportTablePtr(); Error initBaseRelocPtr(); Error initDebugDirectoryPtr(); - Error initTLSDirectoryPtr(); + Error initTLSDirectoryPtr(); Error initLoadConfigPtr(); public: @@ -997,13 +997,13 @@ public: return make_range(debug_directory_begin(), debug_directory_end()); } - const coff_tls_directory32 *getTLSDirectory32() const { - return TLSDirectory32; - } - const coff_tls_directory64 *getTLSDirectory64() const { - return TLSDirectory64; - } - + const coff_tls_directory32 *getTLSDirectory32() const { + return TLSDirectory32; + } + const coff_tls_directory64 *getTLSDirectory64() const { + return TLSDirectory64; + } + const dos_header *getDOSHeader() const { if (!PE32Header && !PE32PlusHeader) return nullptr; |