Path: blob/main/contrib/llvm-project/llvm/lib/ObjCopy/XCOFF/XCOFFWriter.h
35269 views
//===- XCOFFWriter.h --------------------------------------------*- C++ -*-===//1//2// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.3// See https://llvm.org/LICENSE.txt for license information.4// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception5//6//===----------------------------------------------------------------------===//78#ifndef LLVM_LIB_OBJCOPY_XCOFF_XCOFFWRITER_H9#define LLVM_LIB_OBJCOPY_XCOFF_XCOFFWRITER_H1011#include "llvm/Support/MemoryBuffer.h"12#include "XCOFFObject.h"1314#include <cstdint>1516namespace llvm {17namespace objcopy {18namespace xcoff {1920class XCOFFWriter {21public:22virtual ~XCOFFWriter() {}23XCOFFWriter(Object &Obj, raw_ostream &Out) : Obj(Obj), Out(Out) {}24Error write();2526private:27Object &Obj;28raw_ostream &Out;29std::unique_ptr<WritableMemoryBuffer> Buf;30size_t FileSize;3132void finalizeHeaders();33void finalizeSections();34void finalizeSymbolStringTable();35void finalize();3637void writeHeaders();38void writeSections();39void writeSymbolStringTable();40};4142} // end namespace xcoff43} // end namespace objcopy44} // end namespace llvm4546#endif // LLVM_LIB_OBJCOPY_XCOFF_XCOFFWRITER_H474849