aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/libs/llvm12/tools/llvm-objcopy/MachO/MachOWriter.h
diff options
context:
space:
mode:
authororivej <orivej@yandex-team.ru>2022-02-10 16:44:49 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:44:49 +0300
commit718c552901d703c502ccbefdfc3c9028d608b947 (patch)
tree46534a98bbefcd7b1f3faa5b52c138ab27db75b7 /contrib/libs/llvm12/tools/llvm-objcopy/MachO/MachOWriter.h
parente9656aae26e0358d5378e5b63dcac5c8dbe0e4d0 (diff)
downloadydb-718c552901d703c502ccbefdfc3c9028d608b947.tar.gz
Restoring authorship annotation for <orivej@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'contrib/libs/llvm12/tools/llvm-objcopy/MachO/MachOWriter.h')
-rw-r--r--contrib/libs/llvm12/tools/llvm-objcopy/MachO/MachOWriter.h134
1 files changed, 67 insertions, 67 deletions
diff --git a/contrib/libs/llvm12/tools/llvm-objcopy/MachO/MachOWriter.h b/contrib/libs/llvm12/tools/llvm-objcopy/MachO/MachOWriter.h
index c2c6f5a55e..a6681b8a4c 100644
--- a/contrib/libs/llvm12/tools/llvm-objcopy/MachO/MachOWriter.h
+++ b/contrib/libs/llvm12/tools/llvm-objcopy/MachO/MachOWriter.h
@@ -1,67 +1,67 @@
-//===- MachOWriter.h --------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "../Buffer.h"
-#include "MachOLayoutBuilder.h"
-#include "MachOObjcopy.h"
-#include "Object.h"
-#include "llvm/BinaryFormat/MachO.h"
-#include "llvm/Object/MachO.h"
-
-namespace llvm {
-class Error;
-
-namespace objcopy {
-namespace macho {
-
-class MachOWriter {
- Object &O;
- bool Is64Bit;
- bool IsLittleEndian;
- uint64_t PageSize;
- Buffer &B;
- MachOLayoutBuilder LayoutBuilder;
-
- size_t headerSize() const;
- size_t loadCommandsSize() const;
- size_t symTableSize() const;
- size_t strTableSize() const;
-
- void writeHeader();
- void writeLoadCommands();
- template <typename StructType>
- void writeSectionInLoadCommand(const Section &Sec, uint8_t *&Out);
- void writeSections();
- void writeSymbolTable();
- void writeStringTable();
- void writeRebaseInfo();
- void writeBindInfo();
- void writeWeakBindInfo();
- void writeLazyBindInfo();
- void writeExportInfo();
- void writeIndirectSymbolTable();
- void writeLinkData(Optional<size_t> LCIndex, const LinkData &LD);
- void writeCodeSignatureData();
- void writeDataInCodeData();
- void writeFunctionStartsData();
- void writeTail();
-
-public:
- MachOWriter(Object &O, bool Is64Bit, bool IsLittleEndian, uint64_t PageSize,
- Buffer &B)
- : O(O), Is64Bit(Is64Bit), IsLittleEndian(IsLittleEndian),
- PageSize(PageSize), B(B), LayoutBuilder(O, Is64Bit, PageSize) {}
-
- size_t totalSize() const;
- Error finalize();
- Error write();
-};
-
-} // end namespace macho
-} // end namespace objcopy
-} // end namespace llvm
+//===- MachOWriter.h --------------------------------------------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#include "../Buffer.h"
+#include "MachOLayoutBuilder.h"
+#include "MachOObjcopy.h"
+#include "Object.h"
+#include "llvm/BinaryFormat/MachO.h"
+#include "llvm/Object/MachO.h"
+
+namespace llvm {
+class Error;
+
+namespace objcopy {
+namespace macho {
+
+class MachOWriter {
+ Object &O;
+ bool Is64Bit;
+ bool IsLittleEndian;
+ uint64_t PageSize;
+ Buffer &B;
+ MachOLayoutBuilder LayoutBuilder;
+
+ size_t headerSize() const;
+ size_t loadCommandsSize() const;
+ size_t symTableSize() const;
+ size_t strTableSize() const;
+
+ void writeHeader();
+ void writeLoadCommands();
+ template <typename StructType>
+ void writeSectionInLoadCommand(const Section &Sec, uint8_t *&Out);
+ void writeSections();
+ void writeSymbolTable();
+ void writeStringTable();
+ void writeRebaseInfo();
+ void writeBindInfo();
+ void writeWeakBindInfo();
+ void writeLazyBindInfo();
+ void writeExportInfo();
+ void writeIndirectSymbolTable();
+ void writeLinkData(Optional<size_t> LCIndex, const LinkData &LD);
+ void writeCodeSignatureData();
+ void writeDataInCodeData();
+ void writeFunctionStartsData();
+ void writeTail();
+
+public:
+ MachOWriter(Object &O, bool Is64Bit, bool IsLittleEndian, uint64_t PageSize,
+ Buffer &B)
+ : O(O), Is64Bit(Is64Bit), IsLittleEndian(IsLittleEndian),
+ PageSize(PageSize), B(B), LayoutBuilder(O, Is64Bit, PageSize) {}
+
+ size_t totalSize() const;
+ Error finalize();
+ Error write();
+};
+
+} // end namespace macho
+} // end namespace objcopy
+} // end namespace llvm