xref: /freebsd/contrib/llvm-project/llvm/lib/MC/MCDisassembler/MCRelocationInfo.cpp (revision 81ad626541db97eb356e2c1d4a20eb2a26a766ab)
10b57cec5SDimitry Andric //===-- MCRelocationInfo.cpp ----------------------------------------------===//
20b57cec5SDimitry Andric //
30b57cec5SDimitry Andric // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
40b57cec5SDimitry Andric // See https://llvm.org/LICENSE.txt for license information.
50b57cec5SDimitry Andric // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
60b57cec5SDimitry Andric //
70b57cec5SDimitry Andric //===----------------------------------------------------------------------===//
80b57cec5SDimitry Andric 
90b57cec5SDimitry Andric #include "llvm/MC/MCDisassembler/MCRelocationInfo.h"
10*81ad6265SDimitry Andric #include "llvm-c/DisassemblerTypes.h"
11349cc55cSDimitry Andric #include "llvm/MC/TargetRegistry.h"
120b57cec5SDimitry Andric 
130b57cec5SDimitry Andric using namespace llvm;
140b57cec5SDimitry Andric 
MCRelocationInfo(MCContext & Ctx)150b57cec5SDimitry Andric MCRelocationInfo::MCRelocationInfo(MCContext &Ctx) : Ctx(Ctx) {}
160b57cec5SDimitry Andric 
170b57cec5SDimitry Andric MCRelocationInfo::~MCRelocationInfo() = default;
180b57cec5SDimitry Andric 
190b57cec5SDimitry Andric const MCExpr *
createExprForCAPIVariantKind(const MCExpr * SubExpr,unsigned VariantKind)200b57cec5SDimitry Andric MCRelocationInfo::createExprForCAPIVariantKind(const MCExpr *SubExpr,
210b57cec5SDimitry Andric                                                unsigned VariantKind) {
220b57cec5SDimitry Andric   if (VariantKind != LLVMDisassembler_VariantKind_None)
230b57cec5SDimitry Andric     return nullptr;
240b57cec5SDimitry Andric   return SubExpr;
250b57cec5SDimitry Andric }
260b57cec5SDimitry Andric 
createMCRelocationInfo(const Triple & TT,MCContext & Ctx)270b57cec5SDimitry Andric MCRelocationInfo *llvm::createMCRelocationInfo(const Triple &TT,
280b57cec5SDimitry Andric                                                MCContext &Ctx) {
290b57cec5SDimitry Andric   return new MCRelocationInfo(Ctx);
300b57cec5SDimitry Andric }
31