LLVM
3.7.0
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
work
release_test
rc4
llvm.src
lib
Target
ARM
MCTargetDesc
ARMMachORelocationInfo.cpp
Go to the documentation of this file.
1
//===-- ARMMachORelocationInfo.cpp ----------------------------------------===//
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
#include "
MCTargetDesc/ARMMCTargetDesc.h
"
11
#include "
ARMMCExpr.h
"
12
#include "
llvm-c/Disassembler.h
"
13
#include "
llvm/MC/MCContext.h
"
14
#include "
llvm/MC/MCExpr.h
"
15
#include "
llvm/MC/MCRelocationInfo.h
"
16
17
using namespace
llvm;
18
using namespace
object;
19
20
namespace
{
21
class
ARMMachORelocationInfo :
public
MCRelocationInfo
{
22
public
:
23
ARMMachORelocationInfo(
MCContext
&Ctx) :
MCRelocationInfo
(Ctx) {}
24
25
const
MCExpr
*createExprForCAPIVariantKind(
const
MCExpr
*SubExpr,
26
unsigned
VariantKind)
override
{
27
switch
(VariantKind) {
28
case
LLVMDisassembler_VariantKind_ARM_HI16
:
29
return
ARMMCExpr::createUpper16
(SubExpr, Ctx);
30
case
LLVMDisassembler_VariantKind_ARM_LO16
:
31
return
ARMMCExpr::createLower16
(SubExpr, Ctx);
32
default
:
33
return
MCRelocationInfo::createExprForCAPIVariantKind
(SubExpr,
34
VariantKind);
35
}
36
}
37
};
38
}
// End unnamed namespace
39
40
/// createARMMachORelocationInfo - Construct an ARM Mach-O RelocationInfo.
41
MCRelocationInfo
*
llvm::createARMMachORelocationInfo
(
MCContext
&Ctx) {
42
return
new
ARMMachORelocationInfo(Ctx);
43
}
MCContext.h
Disassembler.h
llvm::createARMMachORelocationInfo
MCRelocationInfo * createARMMachORelocationInfo(MCContext &Ctx)
Construct ARM Mach-O relocation info.
Definition:
ARMMachORelocationInfo.cpp:41
ARMMCTargetDesc.h
MCRelocationInfo.h
llvm::MCExpr
Base class for the full range of assembler expressions which are needed for parsing.
Definition:
MCExpr.h:33
llvm::MCContext
Context object for machine code objects.
Definition:
MCContext.h:48
llvm::ARMMCExpr::createLower16
static const ARMMCExpr * createLower16(const MCExpr *Expr, MCContext &Ctx)
Definition:
ARMMCExpr.h:43
LLVMDisassembler_VariantKind_ARM_HI16
#define LLVMDisassembler_VariantKind_ARM_HI16
The ARM target VariantKinds.
Definition:
include/llvm-c/Disassembler.h:95
MCExpr.h
llvm::MCRelocationInfo
Create MCExprs from relocations found in an object file.
Definition:
MCRelocationInfo.h:30
LLVMDisassembler_VariantKind_ARM_LO16
#define LLVMDisassembler_VariantKind_ARM_LO16
Definition:
include/llvm-c/Disassembler.h:96
ARMMCExpr.h
llvm::ARMMCExpr::createUpper16
static const ARMMCExpr * createUpper16(const MCExpr *Expr, MCContext &Ctx)
Definition:
ARMMCExpr.h:39
llvm::MCRelocationInfo::createExprForCAPIVariantKind
virtual const MCExpr * createExprForCAPIVariantKind(const MCExpr *SubExpr, unsigned VariantKind)
Create an MCExpr for the target-specific VariantKind.
Definition:
MCRelocationInfo.cpp:30
Generated on Mon Aug 31 2015 10:59:10 for LLVM by
1.8.6