xref: /freebsd/contrib/llvm-project/lld/MachO/Writer.h (revision dd41de95a84d979615a2ef11df6850622bf6184e)
1 //===- Writer.h -------------------------------------------------*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 
9 #ifndef LLD_MACHO_WRITER_H
10 #define LLD_MACHO_WRITER_H
11 
12 #include <cstdint>
13 
14 namespace lld {
15 namespace macho {
16 
17 class LoadCommand {
18 public:
19   virtual ~LoadCommand() = default;
20   virtual uint32_t getSize() const = 0;
21   virtual void writeTo(uint8_t *buf) const = 0;
22 };
23 
24 void writeResult();
25 
26 void createSyntheticSections();
27 
28 } // namespace macho
29 } // namespace lld
30 
31 #endif
32