From 5addace56d25523af6ce9ecf5406a17c93d72134 Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Wed, 23 Jul 2014 22:26:07 +0000 Subject: Finish inverting the MC -> Object dependency. There were still some disassembler bits in lib/MC, but their use of Object was only visible in the includes they used, not in the symbols. llvm-svn: 213808 --- llvm/lib/MC/MCDisassembler/MCRelocationInfo.cpp | 39 +++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 llvm/lib/MC/MCDisassembler/MCRelocationInfo.cpp (limited to 'llvm/lib/MC/MCDisassembler/MCRelocationInfo.cpp') diff --git a/llvm/lib/MC/MCDisassembler/MCRelocationInfo.cpp b/llvm/lib/MC/MCDisassembler/MCRelocationInfo.cpp new file mode 100644 index 00000000000..ff0c27f5faf --- /dev/null +++ b/llvm/lib/MC/MCDisassembler/MCRelocationInfo.cpp @@ -0,0 +1,39 @@ +//==-- MCRelocationInfo.cpp ------------------------------------------------==// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#include "llvm/MC/MCRelocationInfo.h" +#include "llvm-c/Disassembler.h" +#include "llvm/Object/ObjectFile.h" +#include "llvm/Support/TargetRegistry.h" + +using namespace llvm; + +MCRelocationInfo::MCRelocationInfo(MCContext &Ctx) + : Ctx(Ctx) { +} + +MCRelocationInfo::~MCRelocationInfo() { +} + +const MCExpr * +MCRelocationInfo::createExprForRelocation(object::RelocationRef Rel) { + return nullptr; +} + +const MCExpr * +MCRelocationInfo::createExprForCAPIVariantKind(const MCExpr *SubExpr, + unsigned VariantKind) { + if (VariantKind != LLVMDisassembler_VariantKind_None) + return nullptr; + return SubExpr; +} + +MCRelocationInfo *llvm::createMCRelocationInfo(StringRef TT, MCContext &Ctx) { + return new MCRelocationInfo(Ctx); +} -- cgit v1.2.3