[RISCV] Refactor predicates for rvv intrinsic patterns.
[llvm-project.git] / llvm / lib / ObjCopy / XCOFF / XCOFFWriter.h
blob54c7b5f3ccbe794c8eac995d708b7edf236bc91b
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>
16 #include <vector>
18 namespace llvm {
19 namespace objcopy {
20 namespace xcoff {
22 class XCOFFWriter {
23 public:
24 virtual ~XCOFFWriter() {}
25 XCOFFWriter(Object &Obj, raw_ostream &Out) : Obj(Obj), Out(Out) {}
26 Error write();
28 private:
29 Object &Obj;
30 raw_ostream &Out;
31 std::unique_ptr<WritableMemoryBuffer> Buf;
32 size_t FileSize;
34 void finalizeHeaders();
35 void finalizeSections();
36 void finalizeSymbolStringTable();
37 void finalize();
39 void writeHeaders();
40 void writeSections();
41 void writeSymbolStringTable();
44 } // end namespace xcoff
45 } // end namespace objcopy
46 } // end namespace llvm
48 #endif // LLVM_LIB_OBJCOPY_XCOFF_XCOFFWRITER_H