diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2014-07-23 22:26:07 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2014-07-23 22:26:07 +0000 |
commit | 5addace56d25523af6ce9ecf5406a17c93d72134 (patch) | |
tree | 71ecf5a4ef183f70b8bee90e90b26aaebde2bc91 /llvm/lib/MC/MCDisassembler/MCRelocationInfo.cpp | |
parent | fa154f03d1e2f356f862e2f6960f4dca3ea4bf87 (diff) | |
download | bcm5719-llvm-5addace56d25523af6ce9ecf5406a17c93d72134.tar.gz bcm5719-llvm-5addace56d25523af6ce9ecf5406a17c93d72134.zip |
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
Diffstat (limited to 'llvm/lib/MC/MCDisassembler/MCRelocationInfo.cpp')
-rw-r--r-- | llvm/lib/MC/MCDisassembler/MCRelocationInfo.cpp | 39 |
1 files changed, 39 insertions, 0 deletions
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); +} |