xref: /aosp_15_r20/external/llvm/lib/MC/MCDisassembler/MCRelocationInfo.cpp (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker //==-- MCRelocationInfo.cpp ------------------------------------------------==//
2*9880d681SAndroid Build Coastguard Worker //
3*9880d681SAndroid Build Coastguard Worker //                     The LLVM Compiler Infrastructure
4*9880d681SAndroid Build Coastguard Worker //
5*9880d681SAndroid Build Coastguard Worker // This file is distributed under the University of Illinois Open Source
6*9880d681SAndroid Build Coastguard Worker // License. See LICENSE.TXT for details.
7*9880d681SAndroid Build Coastguard Worker //
8*9880d681SAndroid Build Coastguard Worker //===----------------------------------------------------------------------===//
9*9880d681SAndroid Build Coastguard Worker 
10*9880d681SAndroid Build Coastguard Worker #include "llvm/MC/MCDisassembler/MCRelocationInfo.h"
11*9880d681SAndroid Build Coastguard Worker #include "llvm-c/Disassembler.h"
12*9880d681SAndroid Build Coastguard Worker #include "llvm/Support/TargetRegistry.h"
13*9880d681SAndroid Build Coastguard Worker 
14*9880d681SAndroid Build Coastguard Worker using namespace llvm;
15*9880d681SAndroid Build Coastguard Worker 
MCRelocationInfo(MCContext & Ctx)16*9880d681SAndroid Build Coastguard Worker MCRelocationInfo::MCRelocationInfo(MCContext &Ctx)
17*9880d681SAndroid Build Coastguard Worker   : Ctx(Ctx) {
18*9880d681SAndroid Build Coastguard Worker }
19*9880d681SAndroid Build Coastguard Worker 
~MCRelocationInfo()20*9880d681SAndroid Build Coastguard Worker MCRelocationInfo::~MCRelocationInfo() {
21*9880d681SAndroid Build Coastguard Worker }
22*9880d681SAndroid Build Coastguard Worker 
23*9880d681SAndroid Build Coastguard Worker const MCExpr *
createExprForCAPIVariantKind(const MCExpr * SubExpr,unsigned VariantKind)24*9880d681SAndroid Build Coastguard Worker MCRelocationInfo::createExprForCAPIVariantKind(const MCExpr *SubExpr,
25*9880d681SAndroid Build Coastguard Worker                                                unsigned VariantKind) {
26*9880d681SAndroid Build Coastguard Worker   if (VariantKind != LLVMDisassembler_VariantKind_None)
27*9880d681SAndroid Build Coastguard Worker     return nullptr;
28*9880d681SAndroid Build Coastguard Worker   return SubExpr;
29*9880d681SAndroid Build Coastguard Worker }
30*9880d681SAndroid Build Coastguard Worker 
createMCRelocationInfo(const Triple & TT,MCContext & Ctx)31*9880d681SAndroid Build Coastguard Worker MCRelocationInfo *llvm::createMCRelocationInfo(const Triple &TT,
32*9880d681SAndroid Build Coastguard Worker                                                MCContext &Ctx) {
33*9880d681SAndroid Build Coastguard Worker   return new MCRelocationInfo(Ctx);
34*9880d681SAndroid Build Coastguard Worker }
35