LLVM: lib/MC/MCDisassembler/Disassembler.h Source File (original) (raw)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16#ifndef LLVM_LIB_MC_MCDISASSEMBLER_DISASSEMBLER_H
17#define LLVM_LIB_MC_MCDISASSEMBLER_DISASSEMBLER_H
18
29#include
30#include
31
32namespace llvm {
34
35
36
37
39private:
40
41
42
43
44 std::string TripleName;
45
46 void *DisInfo;
47
48 int TagType;
49
51
53
54
55
56
57
58
59
60 const Target *TheTarget;
61
62 std::unique_ptr MAI;
63
64 std::unique_ptr MRI;
65
66 std::unique_ptr MSI;
67
68 std::unique_ptr MII;
69
70 std::unique_ptr Ctx;
71
72 std::unique_ptr DisAsm;
73
74 std::unique_ptrllvm::MCInstPrinter IP;
75
77
78 std::string CPU;
79
80public:
81
84
88 const Target *TheTarget,
89 std::unique_ptr &&MAI,
90 std::unique_ptr &&MRI,
91 std::unique_ptr &&MSI,
92 std::unique_ptr &&MII,
93 std::unique_ptr &&Ctx,
94 std::unique_ptr &&DisAsm,
95 std::unique_ptr &&IP)
96 : TripleName(std::move(TripleName)), DisInfo(DisInfo), TagType(TagType),
97 GetOpInfo(GetOpInfo), SymbolLookUp(SymbolLookUp), TheTarget(TheTarget),
101 const std::string &getTripleName() const { return TripleName; }
106 return SymbolLookUp;
107 }
119 void setCPU(const char *CPU) { this->CPU = CPU; }
120};
121
122}
123
124#endif
unsigned const MachineRegisterInfo * MRI
This file defines the SmallString class.
const MCDisassembler * getDisAsm() const
void setCPU(const char *CPU)
void addOptions(uint64_t Options)
raw_svector_ostream CommentStream
void setIP(MCInstPrinter *NewIP)
LLVMSymbolLookupCallback getSymbolLookupCallback() const
const MCSubtargetInfo * getSubtargetInfo() const
const MCAsmInfo * getAsmInfo() const
LLVMOpInfoCallback getGetOpInfo() const
uint64_t getOptions() const
const MCRegisterInfo * getRegisterInfo() const
void * getDisInfo() const
SmallString< 128 > CommentsToEmit
const MCInstrInfo * getInstrInfo() const
const Target * getTarget() const
LLVMDisasmContext(std::string TripleName, void *DisInfo, int TagType, LLVMOpInfoCallback GetOpInfo, LLVMSymbolLookupCallback SymbolLookUp, const Target *TheTarget, std::unique_ptr< const MCAsmInfo > &&MAI, std::unique_ptr< const MCRegisterInfo > &&MRI, std::unique_ptr< const MCSubtargetInfo > &&MSI, std::unique_ptr< const MCInstrInfo > &&MII, std::unique_ptr< const llvm::MCContext > &&Ctx, std::unique_ptr< const MCDisassembler > &&DisAsm, std::unique_ptr< MCInstPrinter > &&IP)
const std::string & getTripleName() const
This class is intended to be used as a base class for asm properties and features specific to the tar...
Superclass for all disassemblers.
This is an instance of a target assembly language printer that converts an MCInst to valid target ass...
Interface to description of machine instruction set.
const MCInstrDesc & get(unsigned Opcode) const
Return the machine instruction descriptor that corresponds to the specified instruction opcode.
MCRegisterInfo base class - We assume that the target defines a static array of MCRegisterDesc object...
Generic base class for all target subtargets.
SmallString - A SmallString is just a SmallVector with methods and accessors that make it work better...
StringRef - Represent a constant reference to a string, i.e.
Target - Wrapper for Target specific information.
A raw_ostream that writes to an SmallVector or SmallString.
const char *(* LLVMSymbolLookupCallback)(void *DisInfo, uint64_t ReferenceValue, uint64_t *ReferenceType, uint64_t ReferencePC, const char **ReferenceName)
The type for the symbol lookup function.
int(* LLVMOpInfoCallback)(void *DisInfo, uint64_t PC, uint64_t Offset, uint64_t OpSize, uint64_t InstSize, int TagType, void *TagBuf)
The type for the operand information call back function.
This is an optimization pass for GlobalISel generic memory operations.
OutputIt move(R &&Range, OutputIt Out)
Provide wrappers to std::move which take ranges instead of having to pass begin/end explicitly.
Implement std::hash so that hash_code can be used in STL containers.