LLVM: lib/MC/MCLinkerOptimizationHint.cpp Source File (original) (raw)
1
2
3
4
5
6
7
8
13#include
14#include
15
16using namespace llvm;
17
18
19
20
21
22
23
24
25
28
- const {
32 for (const MCSymbol *Arg : Args)
34}
35
39 emit_impl(Asm, OutStream, ObjWriter);
40}
41
44 class raw_counting_ostream : public raw_ostream {
46
47 void write_impl(const char *, size_t size) override { Count += size; }
48
49 uint64_t current_pos() const override { return Count; }
50
51 public:
52 raw_counting_ostream() = default;
53 ~raw_counting_ostream() override { flush(); }
54 };
55
56 raw_counting_ostream OutStream;
57 emit_impl(Asm, OutStream, ObjWriter);
58 return OutStream.tell();
59}
uint64_t getEmitSize(const MCAssembler &Asm, const MachObjectWriter &ObjWriter) const
Get the size in bytes of this directive if emitted in ObjWriter with the given Layout.
void emit(const MCAssembler &Asm, MachObjectWriter &ObjWriter) const
Emit this directive as: <kind, numArgs, addr1, ..., addrN>
MCSymbol - Instances of this class represent a symbol name in the MC file, and MCSymbols are created ...
support::endian::Writer W
uint64_t getSymbolAddress(const MCSymbol &S, const MCAssembler &Asm) const
This class implements an extremely fast bulk output stream that can only output to a stream.
This is an optimization pass for GlobalISel generic memory operations.
auto size(R &&Range, std::enable_if_t< std::is_base_of< std::random_access_iterator_tag, typename std::iterator_traits< decltype(Range.begin())>::iterator_category >::value, void > *=nullptr)
Get the size of a range.
unsigned encodeULEB128(uint64_t Value, raw_ostream &OS, unsigned PadTo=0)
Utility function to encode a ULEB128 value to an output stream.