Rafael Espindola | 5addace | 2014-07-23 22:26:07 +0000 | [diff] [blame] | 1 | //==-- MCRelocationInfo.cpp ------------------------------------------------==// |
Ahmed Bougacha | ad1084d | 2013-05-24 00:39:57 +0000 | [diff] [blame] | 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/MCRelocationInfo.h" |
Chandler Carruth | 8a8cd2b | 2014-01-07 11:48:04 +0000 | [diff] [blame] | 11 | #include "llvm-c/Disassembler.h" |
Ahmed Bougacha | ad1084d | 2013-05-24 00:39:57 +0000 | [diff] [blame] | 12 | #include "llvm/Object/ObjectFile.h" |
| 13 | #include "llvm/Support/TargetRegistry.h" |
Ahmed Bougacha | ad1084d | 2013-05-24 00:39:57 +0000 | [diff] [blame] | 14 | |
| 15 | using namespace llvm; |
| 16 | |
| 17 | MCRelocationInfo::MCRelocationInfo(MCContext &Ctx) |
| 18 | : Ctx(Ctx) { |
| 19 | } |
| 20 | |
| 21 | MCRelocationInfo::~MCRelocationInfo() { |
| 22 | } |
| 23 | |
| 24 | const MCExpr * |
| 25 | MCRelocationInfo::createExprForRelocation(object::RelocationRef Rel) { |
Craig Topper | bb694de | 2014-04-13 04:57:38 +0000 | [diff] [blame] | 26 | return nullptr; |
Ahmed Bougacha | ad1084d | 2013-05-24 00:39:57 +0000 | [diff] [blame] | 27 | } |
| 28 | |
| 29 | const MCExpr * |
| 30 | MCRelocationInfo::createExprForCAPIVariantKind(const MCExpr *SubExpr, |
| 31 | unsigned VariantKind) { |
| 32 | if (VariantKind != LLVMDisassembler_VariantKind_None) |
Craig Topper | bb694de | 2014-04-13 04:57:38 +0000 | [diff] [blame] | 33 | return nullptr; |
Ahmed Bougacha | ad1084d | 2013-05-24 00:39:57 +0000 | [diff] [blame] | 34 | return SubExpr; |
| 35 | } |
| 36 | |
Daniel Sanders | 50f1723 | 2015-09-15 16:17:27 +0000 | [diff] [blame^] | 37 | MCRelocationInfo *llvm::createMCRelocationInfo(const Triple &TT, |
Daniel Sanders | 9aa7e38 | 2015-06-10 10:54:40 +0000 | [diff] [blame] | 38 | MCContext &Ctx) { |
Ahmed Bougacha | ad1084d | 2013-05-24 00:39:57 +0000 | [diff] [blame] | 39 | return new MCRelocationInfo(Ctx); |
| 40 | } |