LLVM
22.0.0git
lib
ObjCopy
XCOFF
XCOFFWriter.h
Go to the documentation of this file.
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
//===----------------------------------------------------------------------===//
8
9
#ifndef LLVM_LIB_OBJCOPY_XCOFF_XCOFFWRITER_H
10
#define LLVM_LIB_OBJCOPY_XCOFF_XCOFFWRITER_H
11
12
#include "
llvm/Support/MemoryBuffer.h
"
13
#include "
XCOFFObject.h
"
14
15
#include <cstdint>
16
17
namespace
llvm
{
18
namespace
objcopy
{
19
namespace
xcoff
{
20
21
class
XCOFFWriter
{
22
public
:
23
virtual
~XCOFFWriter
() {}
24
XCOFFWriter
(
Object
&Obj,
raw_ostream
&Out) : Obj(Obj), Out(Out) {}
25
Error
write
();
26
27
private
:
28
Object
&Obj;
29
raw_ostream
&Out;
30
std::unique_ptr<WritableMemoryBuffer> Buf;
31
size_t
FileSize;
32
33
void
finalizeHeaders();
34
void
finalizeSections();
35
void
finalizeSymbolStringTable();
36
void
finalize
();
37
38
void
writeHeaders();
39
void
writeSections();
40
void
writeSymbolStringTable();
41
};
42
43
}
// end namespace xcoff
44
}
// end namespace objcopy
45
}
// end namespace llvm
46
47
#endif
// LLVM_LIB_OBJCOPY_XCOFF_XCOFFWRITER_H
finalize
arc branch finalize
Definition
ARCBranchFinalize.cpp:65
MemoryBuffer.h
XCOFFObject.h
llvm::Error
Lightweight error class with error context and mandatory checking.
Definition
Error.h:159
llvm::objcopy::xcoff::XCOFFWriter::~XCOFFWriter
virtual ~XCOFFWriter()
Definition
XCOFFWriter.h:23
llvm::objcopy::xcoff::XCOFFWriter::XCOFFWriter
XCOFFWriter(Object &Obj, raw_ostream &Out)
Definition
XCOFFWriter.h:24
llvm::objcopy::xcoff::XCOFFWriter::write
Error write()
Definition
XCOFFWriter.cpp:108
llvm::raw_ostream
This class implements an extremely fast bulk output stream that can only output to a stream.
Definition
raw_ostream.h:53
llvm::objcopy::xcoff
Definition
XCOFFObjcopy.h:24
llvm::objcopy
Definition
COFFConfig.h:15
llvm
This is an optimization pass for GlobalISel generic memory operations.
Definition
AddressRanges.h:18
llvm::objcopy::xcoff::Object
Definition
XCOFFObject.h:36
Generated on
for LLVM by
1.14.0