[clang] Document the return value of __builtin_COLUMN (#118360)
[llvm-project.git] / llvm / lib / ObjCopy / XCOFF / XCOFFWriter.h
blob8620548ed59910ac62e682ae9c22b1a819ff2702
1 //===- XCOFFWriter.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 //===----------------------------------------------------------------------===//
9 #ifndef LLVM_LIB_OBJCOPY_XCOFF_XCOFFWRITER_H
10 #define LLVM_LIB_OBJCOPY_XCOFF_XCOFFWRITER_H
12 #include "llvm/Support/MemoryBuffer.h"
13 #include "XCOFFObject.h"
15 #include <cstdint>
17 namespace llvm {
18 namespace objcopy {
19 namespace xcoff {
21 class XCOFFWriter {
22 public:
23 virtual ~XCOFFWriter() {}
24 XCOFFWriter(Object &Obj, raw_ostream &Out) : Obj(Obj), Out(Out) {}
25 Error write();
27 private:
28 Object &Obj;
29 raw_ostream &Out;
30 std::unique_ptr<WritableMemoryBuffer> Buf;
31 size_t FileSize;
33 void finalizeHeaders();
34 void finalizeSections();
35 void finalizeSymbolStringTable();
36 void finalize();
38 void writeHeaders();
39 void writeSections();
40 void writeSymbolStringTable();
43 } // end namespace xcoff
44 } // end namespace objcopy
45 } // end namespace llvm
47 #endif // LLVM_LIB_OBJCOPY_XCOFF_XCOFFWRITER_H