llvm-capstone/lld/MachO/Writer.h
Nico Weber bf20d43f82 [lld/mac] Use C++17 nested namespace syntax in most places
Some header files used

    namespace lld {
    namespace macho {
    // ...
    } // namespace macho
    std::string toString(const Type &t);
    } // namespace lld

In those files, I didn't use a nested namespace since it's not a big win there.

No behavior change.

Differential Revision: https://reviews.llvm.org/D131354
2022-08-08 07:11:17 -04:00

41 lines
1.0 KiB
C++

//===- Writer.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
//
//===----------------------------------------------------------------------===//
#ifndef LLD_MACHO_WRITER_H
#define LLD_MACHO_WRITER_H
#include <cstdint>
namespace lld::macho {
class OutputSection;
class InputSection;
class Symbol;
class LoadCommand {
public:
virtual ~LoadCommand() = default;
virtual uint32_t getSize() const = 0;
virtual void writeTo(uint8_t *buf) const = 0;
};
template <class LP> void writeResult();
void resetWriter();
void createSyntheticSections();
// Add bindings for symbols that need weak or non-lazy bindings.
void addNonLazyBindingEntries(const Symbol *, const InputSection *,
uint64_t offset, int64_t addend = 0);
extern OutputSection *firstTLVDataSection;
} // namespace lld::macho
#endif