LLVM  8.0.1
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_MCDISASSEMBLER_MCRELOCATIONINFO_H
17 #define LLVM_MC_MCDISASSEMBLER_MCRELOCATIONINFO_H
18 
19 namespace llvm {
20 
21 class MCContext;
22 class MCExpr;
23 
24 /// Create MCExprs from relocations found in an object file.
26 protected:
28 
29 public:
31  MCRelocationInfo(const MCRelocationInfo &) = delete;
32  MCRelocationInfo &operator=(const MCRelocationInfo &) = delete;
33  virtual ~MCRelocationInfo();
34 
35  /// Create an MCExpr for the target-specific \p VariantKind.
36  /// The VariantKinds are defined in llvm-c/Disassembler.h.
37  /// Used by MCExternalSymbolizer.
38  /// \returns If possible, an MCExpr corresponding to VariantKind, else 0.
39  virtual const MCExpr *createExprForCAPIVariantKind(const MCExpr *SubExpr,
40  unsigned VariantKind);
41 };
42 
43 } // end namespace llvm
44 
45 #endif // LLVM_MC_MCDISASSEMBLER_MCRELOCATIONINFO_H
This class represents lattice values for constants.
Definition: AllocatorList.h:24
Base class for the full range of assembler expressions which are needed for parsing.
Definition: MCExpr.h:36
Context object for machine code objects.
Definition: MCContext.h:63
Create MCExprs from relocations found in an object file.
MCRelocationInfo & operator=(const MCRelocationInfo &)=delete
virtual const MCExpr * createExprForCAPIVariantKind(const MCExpr *SubExpr, unsigned VariantKind)
Create an MCExpr for the target-specific VariantKind.
MCRelocationInfo(MCContext &Ctx)