LLVM  8.0.1
AArch64ExternalSymbolizer.h
Go to the documentation of this file.
1 //===- AArch64ExternalSymbolizer.h - Symbolizer for AArch64 -----*- C++ -*-===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // Symbolize AArch64 assembly code during disassembly using callbacks.
11 //
12 //===----------------------------------------------------------------------===//
13 
14 #ifndef LLVM_LIB_TARGET_AARCH64_DISASSEMBLER_AARCH64EXTERNALSYMBOLIZER_H
15 #define LLVM_LIB_TARGET_AARCH64_DISASSEMBLER_AARCH64EXTERNALSYMBOLIZER_H
16 
18 
19 namespace llvm {
20 
22 public:
24  std::unique_ptr<MCRelocationInfo> RelInfo,
27  void *DisInfo)
28  : MCExternalSymbolizer(Ctx, std::move(RelInfo), GetOpInfo, SymbolLookUp,
29  DisInfo) {}
30 
31  bool tryAddingSymbolicOperand(MCInst &MI, raw_ostream &CommentStream,
32  int64_t Value, uint64_t Address, bool IsBranch,
33  uint64_t Offset, uint64_t InstSize) override;
34 };
35 
36 } // namespace llvm
37 
38 #endif
std::unique_ptr< MCRelocationInfo > RelInfo
Definition: MCSymbolizer.h:42
This class represents lattice values for constants.
Definition: AllocatorList.h:24
Symbolize using user-provided, C API, callbacks.
MCContext & Ctx
Definition: MCSymbolizer.h:41
void * DisInfo
The pointer to the block of symbolic information for above call back.
Definition: BitVector.h:938
int(* LLVMOpInfoCallback)(void *DisInfo, uint64_t PC, uint64_t Offset, uint64_t Size, int TagType, void *TagBuf)
The type for the operand information call back function.
Context object for machine code objects.
Definition: MCContext.h:63
Instances of this class represent a single low-level machine instruction.
Definition: MCInst.h:161
bool tryAddingSymbolicOperand(MCInst &MI, raw_ostream &CommentStream, int64_t Value, uint64_t Address, bool IsBranch, uint64_t Offset, uint64_t InstSize) override
tryAddingSymbolicOperand - tryAddingSymbolicOperand trys to add a symbolic operand in place of the im...
AArch64ExternalSymbolizer(MCContext &Ctx, std::unique_ptr< MCRelocationInfo > RelInfo, LLVMOpInfoCallback GetOpInfo, LLVMSymbolLookupCallback SymbolLookUp, void *DisInfo)
LLVM Value Representation.
Definition: Value.h:73
This class implements an extremely fast bulk output stream that can only output to a stream...
Definition: raw_ostream.h:46
IRTranslator LLVM IR MI
const char *(* LLVMSymbolLookupCallback)(void *DisInfo, uint64_t ReferenceValue, uint64_t *ReferenceType, uint64_t ReferencePC, const char **ReferenceName)
The type for the symbol lookup function.
LLVMSymbolLookupCallback SymbolLookUp
The function to lookup a symbol name.