• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 
10 #include "llvm/MC/MCDisassembler/MCRelocationInfo.h"
11 #include "llvm-c/Disassembler.h"
12 #include "llvm/Support/TargetRegistry.h"
13 
14 using namespace llvm;
15 
MCRelocationInfo(MCContext & Ctx)16 MCRelocationInfo::MCRelocationInfo(MCContext &Ctx)
17   : Ctx(Ctx) {
18 }
19 
~MCRelocationInfo()20 MCRelocationInfo::~MCRelocationInfo() {
21 }
22 
23 const MCExpr *
createExprForCAPIVariantKind(const MCExpr * SubExpr,unsigned VariantKind)24 MCRelocationInfo::createExprForCAPIVariantKind(const MCExpr *SubExpr,
25                                                unsigned VariantKind) {
26   if (VariantKind != LLVMDisassembler_VariantKind_None)
27     return nullptr;
28   return SubExpr;
29 }
30 
createMCRelocationInfo(const Triple & TT,MCContext & Ctx)31 MCRelocationInfo *llvm::createMCRelocationInfo(const Triple &TT,
32                                                MCContext &Ctx) {
33   return new MCRelocationInfo(Ctx);
34 }
35