LLVM  3.7.0
MCRelocationInfo.cpp
Go to the documentation of this file.
1 //==-- MCRelocationInfo.cpp ------------------------------------------------==//
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 
11 #include "llvm-c/Disassembler.h"
12 #include "llvm/Object/ObjectFile.h"
14 
15 using namespace llvm;
16 
17 MCRelocationInfo::MCRelocationInfo(MCContext &Ctx)
18  : Ctx(Ctx) {
19 }
20 
22 }
23 
24 const MCExpr *
26  return nullptr;
27 }
28 
29 const MCExpr *
31  unsigned VariantKind) {
32  if (VariantKind != LLVMDisassembler_VariantKind_None)
33  return nullptr;
34  return SubExpr;
35 }
36 
38  MCContext &Ctx) {
39  return new MCRelocationInfo(Ctx);
40 }
Base class for the full range of assembler expressions which are needed for parsing.
Definition: MCExpr.h:33
This is a value type class that represents a single relocation in the list of relocations in the obje...
Definition: ObjectFile.h:40
Context object for machine code objects.
Definition: MCContext.h:48
#define LLVMDisassembler_VariantKind_None
The operand VariantKinds for symbolic disassembly.
MCRelocationInfo * createMCRelocationInfo(const Triple &TT, MCContext &Ctx)
Create MCExprs from relocations found in an object file.
Triple - Helper class for working with autoconf configuration names.
Definition: Triple.h:44
virtual const MCExpr * createExprForRelocation(object::RelocationRef Rel)
Create an MCExpr for the relocation Rel.
virtual const MCExpr * createExprForCAPIVariantKind(const MCExpr *SubExpr, unsigned VariantKind)
Create an MCExpr for the target-specific VariantKind.