blob: 8f932a3f0d48771f5322ac508ffb48f15c6cba7f [file] [log] [blame]
Eugene Zelenko3d8b0eb2017-02-08 22:23:19 +00001//===-- MCRelocationInfo.cpp ----------------------------------------------===//
Ahmed Bougachaad1084d2013-05-24 00:39:57 +00002//
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
Benjamin Kramerf57c1972016-01-26 16:44:37 +000010#include "llvm/MC/MCDisassembler/MCRelocationInfo.h"
Eugene Zelenko3d8b0eb2017-02-08 22:23:19 +000011#include "llvm-c/Disassembler.h"
Chandler Carruth6bda14b2017-06-06 11:49:48 +000012#include "llvm/Support/TargetRegistry.h"
Ahmed Bougachaad1084d2013-05-24 00:39:57 +000013
14using namespace llvm;
15
Eugene Zelenko3d8b0eb2017-02-08 22:23:19 +000016MCRelocationInfo::MCRelocationInfo(MCContext &Ctx) : Ctx(Ctx) {}
Ahmed Bougachaad1084d2013-05-24 00:39:57 +000017
Eugene Zelenko3d8b0eb2017-02-08 22:23:19 +000018MCRelocationInfo::~MCRelocationInfo() = default;
Ahmed Bougachaad1084d2013-05-24 00:39:57 +000019
20const MCExpr *
Ahmed Bougachaad1084d2013-05-24 00:39:57 +000021MCRelocationInfo::createExprForCAPIVariantKind(const MCExpr *SubExpr,
22 unsigned VariantKind) {
23 if (VariantKind != LLVMDisassembler_VariantKind_None)
Craig Topperbb694de2014-04-13 04:57:38 +000024 return nullptr;
Ahmed Bougachaad1084d2013-05-24 00:39:57 +000025 return SubExpr;
26}
27
Daniel Sanders50f17232015-09-15 16:17:27 +000028MCRelocationInfo *llvm::createMCRelocationInfo(const Triple &TT,
Daniel Sanders9aa7e382015-06-10 10:54:40 +000029 MCContext &Ctx) {
Ahmed Bougachaad1084d2013-05-24 00:39:57 +000030 return new MCRelocationInfo(Ctx);
31}