diff options
author | shadchin <shadchin@yandex-team.ru> | 2022-02-10 16:44:30 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:44:30 +0300 |
commit | 2598ef1d0aee359b4b6d5fdd1758916d5907d04f (patch) | |
tree | 012bb94d777798f1f56ac1cec429509766d05181 /contrib/libs/llvm12/lib/MC/StringTableBuilder.cpp | |
parent | 6751af0b0c1b952fede40b19b71da8025b5d8bcf (diff) | |
download | ydb-2598ef1d0aee359b4b6d5fdd1758916d5907d04f.tar.gz |
Restoring authorship annotation for <shadchin@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'contrib/libs/llvm12/lib/MC/StringTableBuilder.cpp')
-rw-r--r-- | contrib/libs/llvm12/lib/MC/StringTableBuilder.cpp | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/contrib/libs/llvm12/lib/MC/StringTableBuilder.cpp b/contrib/libs/llvm12/lib/MC/StringTableBuilder.cpp index 973c59057c..dd852d6ef7 100644 --- a/contrib/libs/llvm12/lib/MC/StringTableBuilder.cpp +++ b/contrib/libs/llvm12/lib/MC/StringTableBuilder.cpp @@ -33,12 +33,12 @@ void StringTableBuilder::initSize() { case DWARF: Size = 0; break; - case MachOLinked: - case MachO64Linked: - Size = 2; - break; + case MachOLinked: + case MachO64Linked: + Size = 2; + break; case MachO: - case MachO64: + case MachO64: case ELF: // Start the table with a NUL byte. Size = 1; @@ -166,17 +166,17 @@ void StringTableBuilder::finalizeStringTable(bool Optimize) { } } - if (K == MachO || K == MachOLinked) + if (K == MachO || K == MachOLinked) Size = alignTo(Size, 4); // Pad to multiple of 4. - if (K == MachO64 || K == MachO64Linked) - Size = alignTo(Size, 8); // Pad to multiple of 8. - - // According to ld64 the string table of a final linked Mach-O binary starts - // with " ", i.e. the first byte is ' ' and the second byte is zero. In - // 'initSize()' we reserved the first two bytes for holding this string. - if (K == MachOLinked || K == MachO64Linked) - StringIndexMap[CachedHashStringRef(" ")] = 0; - + if (K == MachO64 || K == MachO64Linked) + Size = alignTo(Size, 8); // Pad to multiple of 8. + + // According to ld64 the string table of a final linked Mach-O binary starts + // with " ", i.e. the first byte is ' ' and the second byte is zero. In + // 'initSize()' we reserved the first two bytes for holding this string. + if (K == MachOLinked || K == MachO64Linked) + StringIndexMap[CachedHashStringRef(" ")] = 0; + // The first byte in an ELF string table must be null, according to the ELF // specification. In 'initSize()' we reserved the first byte to hold null for // this purpose and here we actually add the string to allow 'getOffset()' to |