1321369Sdim//===- llvm/MC/MCRelocationInfo.h -------------------------------*- C++ -*-===// 2303231Sdim// 3353358Sdim// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4353358Sdim// See https://llvm.org/LICENSE.txt for license information. 5353358Sdim// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6303231Sdim// 7303231Sdim//===----------------------------------------------------------------------===// 8303231Sdim// 9303231Sdim// This file declares the MCRelocationInfo class, which provides methods to 10303231Sdim// create MCExprs from relocations, either found in an object::ObjectFile 11303231Sdim// (object::RelocationRef), or provided through the C API. 12303231Sdim// 13303231Sdim//===----------------------------------------------------------------------===// 14303231Sdim 15303231Sdim#ifndef LLVM_MC_MCDISASSEMBLER_MCRELOCATIONINFO_H 16303231Sdim#define LLVM_MC_MCDISASSEMBLER_MCRELOCATIONINFO_H 17303231Sdim 18303231Sdimnamespace llvm { 19303231Sdim 20321369Sdimclass MCContext; 21303231Sdimclass MCExpr; 22303231Sdim 23341825Sdim/// Create MCExprs from relocations found in an object file. 24303231Sdimclass MCRelocationInfo { 25303231Sdimprotected: 26303231Sdim MCContext &Ctx; 27303231Sdim 28303231Sdimpublic: 29303231Sdim MCRelocationInfo(MCContext &Ctx); 30321369Sdim MCRelocationInfo(const MCRelocationInfo &) = delete; 31321369Sdim MCRelocationInfo &operator=(const MCRelocationInfo &) = delete; 32303231Sdim virtual ~MCRelocationInfo(); 33303231Sdim 34341825Sdim /// Create an MCExpr for the target-specific \p VariantKind. 35303231Sdim /// The VariantKinds are defined in llvm-c/Disassembler.h. 36303231Sdim /// Used by MCExternalSymbolizer. 37303231Sdim /// \returns If possible, an MCExpr corresponding to VariantKind, else 0. 38303231Sdim virtual const MCExpr *createExprForCAPIVariantKind(const MCExpr *SubExpr, 39303231Sdim unsigned VariantKind); 40303231Sdim}; 41303231Sdim 42321369Sdim} // end namespace llvm 43303231Sdim 44321369Sdim#endif // LLVM_MC_MCDISASSEMBLER_MCRELOCATIONINFO_H 45