LLVM API Documentation

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
MCRelocationInfo.h
Go to the documentation of this file.
1 //==-- llvm/MC/MCRelocationInfo.h --------------------------------*- C++ -*-==//
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 // This file declares the MCRelocationInfo class, which provides methods to
11 // create MCExprs from relocations, either found in an object::ObjectFile
12 // (object::RelocationRef), or provided through the C API.
13 //
14 //===----------------------------------------------------------------------===//
15 
16 #ifndef LLVM_MC_MCRELOCATIONINFO_H
17 #define LLVM_MC_MCRELOCATIONINFO_H
18 
19 #include "llvm/Support/Compiler.h"
20 
21 namespace llvm {
22 
23 namespace object {
24 class RelocationRef;
25 }
26 class MCExpr;
27 class MCContext;
28 
29 /// \brief Create MCExprs from relocations found in an object file.
32  void operator=(const MCRelocationInfo &) LLVM_DELETED_FUNCTION;
33 
34 protected:
36 
37 public:
39  virtual ~MCRelocationInfo();
40 
41  /// \brief Create an MCExpr for the relocation \p Rel.
42  /// \returns If possible, an MCExpr corresponding to Rel, else 0.
44 
45  /// \brief Create an MCExpr for the target-specific \p VariantKind.
46  /// The VariantKinds are defined in llvm-c/Disassembler.h.
47  /// Used by MCExternalSymbolizer.
48  /// \returns If possible, an MCExpr corresponding to VariantKind, else 0.
49  virtual const MCExpr *createExprForCAPIVariantKind(const MCExpr *SubExpr,
50  unsigned VariantKind);
51 };
52 
53 }
54 
55 #endif
Create MCExprs from relocations found in an object file.
virtual const MCExpr * createExprForRelocation(object::RelocationRef Rel)
Create an MCExpr for the relocation Rel.
#define LLVM_DELETED_FUNCTION
Definition: Compiler.h:137
virtual const MCExpr * createExprForCAPIVariantKind(const MCExpr *SubExpr, unsigned VariantKind)
Create an MCExpr for the target-specific VariantKind. The VariantKinds are defined in llvm-c/Disassem...