12c94d0faa0e1c268893d5e04dc77e8a35889db00Ahmed Bougacha//==-- lib/MC/MCRelocationInfo.cpp -------------------------------*- C++ -*-==// 22c94d0faa0e1c268893d5e04dc77e8a35889db00Ahmed Bougacha// 32c94d0faa0e1c268893d5e04dc77e8a35889db00Ahmed Bougacha// The LLVM Compiler Infrastructure 42c94d0faa0e1c268893d5e04dc77e8a35889db00Ahmed Bougacha// 52c94d0faa0e1c268893d5e04dc77e8a35889db00Ahmed Bougacha// This file is distributed under the University of Illinois Open Source 62c94d0faa0e1c268893d5e04dc77e8a35889db00Ahmed Bougacha// License. See LICENSE.TXT for details. 72c94d0faa0e1c268893d5e04dc77e8a35889db00Ahmed Bougacha// 82c94d0faa0e1c268893d5e04dc77e8a35889db00Ahmed Bougacha//===----------------------------------------------------------------------===// 92c94d0faa0e1c268893d5e04dc77e8a35889db00Ahmed Bougacha 102c94d0faa0e1c268893d5e04dc77e8a35889db00Ahmed Bougacha#include "llvm/MC/MCRelocationInfo.h" 1136b56886974eae4f9c5ebc96befd3e7bfe5de338Stephen Hines#include "llvm-c/Disassembler.h" 122c94d0faa0e1c268893d5e04dc77e8a35889db00Ahmed Bougacha#include "llvm/Object/ObjectFile.h" 132c94d0faa0e1c268893d5e04dc77e8a35889db00Ahmed Bougacha#include "llvm/Support/TargetRegistry.h" 142c94d0faa0e1c268893d5e04dc77e8a35889db00Ahmed Bougacha 152c94d0faa0e1c268893d5e04dc77e8a35889db00Ahmed Bougachausing namespace llvm; 162c94d0faa0e1c268893d5e04dc77e8a35889db00Ahmed Bougacha 172c94d0faa0e1c268893d5e04dc77e8a35889db00Ahmed BougachaMCRelocationInfo::MCRelocationInfo(MCContext &Ctx) 182c94d0faa0e1c268893d5e04dc77e8a35889db00Ahmed Bougacha : Ctx(Ctx) { 192c94d0faa0e1c268893d5e04dc77e8a35889db00Ahmed Bougacha} 202c94d0faa0e1c268893d5e04dc77e8a35889db00Ahmed Bougacha 212c94d0faa0e1c268893d5e04dc77e8a35889db00Ahmed BougachaMCRelocationInfo::~MCRelocationInfo() { 222c94d0faa0e1c268893d5e04dc77e8a35889db00Ahmed Bougacha} 232c94d0faa0e1c268893d5e04dc77e8a35889db00Ahmed Bougacha 242c94d0faa0e1c268893d5e04dc77e8a35889db00Ahmed Bougachaconst MCExpr * 252c94d0faa0e1c268893d5e04dc77e8a35889db00Ahmed BougachaMCRelocationInfo::createExprForRelocation(object::RelocationRef Rel) { 26dce4a407a24b04eebc6a376f8e62b41aaa7b071fStephen Hines return nullptr; 272c94d0faa0e1c268893d5e04dc77e8a35889db00Ahmed Bougacha} 282c94d0faa0e1c268893d5e04dc77e8a35889db00Ahmed Bougacha 292c94d0faa0e1c268893d5e04dc77e8a35889db00Ahmed Bougachaconst MCExpr * 302c94d0faa0e1c268893d5e04dc77e8a35889db00Ahmed BougachaMCRelocationInfo::createExprForCAPIVariantKind(const MCExpr *SubExpr, 312c94d0faa0e1c268893d5e04dc77e8a35889db00Ahmed Bougacha unsigned VariantKind) { 322c94d0faa0e1c268893d5e04dc77e8a35889db00Ahmed Bougacha if (VariantKind != LLVMDisassembler_VariantKind_None) 33dce4a407a24b04eebc6a376f8e62b41aaa7b071fStephen Hines return nullptr; 342c94d0faa0e1c268893d5e04dc77e8a35889db00Ahmed Bougacha return SubExpr; 352c94d0faa0e1c268893d5e04dc77e8a35889db00Ahmed Bougacha} 362c94d0faa0e1c268893d5e04dc77e8a35889db00Ahmed Bougacha 37de7cbbfcce5c068f0699bdcb6dac093c0c91ba6fQuentin ColombetMCRelocationInfo *llvm::createMCRelocationInfo(StringRef TT, MCContext &Ctx) { 382c94d0faa0e1c268893d5e04dc77e8a35889db00Ahmed Bougacha return new MCRelocationInfo(Ctx); 392c94d0faa0e1c268893d5e04dc77e8a35889db00Ahmed Bougacha} 40