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
ARMMCExpr.cpp
Go to the documentation of this file.
1
//===-- ARMMCExpr.cpp - ARM specific MC expression classes ----------------===//
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 "
ARMMCExpr.h
"
11
#include "
llvm/MC/MCAssembler.h
"
12
#include "
llvm/MC/MCContext.h
"
13
#include "
llvm/MC/MCStreamer.h
"
14
using namespace
llvm;
15
16
#define DEBUG_TYPE "armmcexpr"
17
18
const
ARMMCExpr
*
19
ARMMCExpr::create
(
VariantKind
Kind
,
const
MCExpr
*Expr,
20
MCContext
&Ctx) {
21
return
new
(Ctx)
ARMMCExpr
(Kind, Expr);
22
}
23
24
void
ARMMCExpr::printImpl
(
raw_ostream
&OS,
const
MCAsmInfo
*MAI)
const
{
25
switch
(Kind) {
26
default
:
llvm_unreachable
(
"Invalid kind!"
);
27
case
VK_ARM_HI16
: OS <<
":upper16:"
;
break
;
28
case
VK_ARM_LO16
: OS <<
":lower16:"
;
break
;
29
}
30
31
const
MCExpr
*Expr =
getSubExpr
();
32
if
(Expr->
getKind
() !=
MCExpr::SymbolRef
)
33
OS <<
'('
;
34
Expr->
print
(OS, MAI);
35
if
(Expr->
getKind
() !=
MCExpr::SymbolRef
)
36
OS <<
')'
;
37
}
38
39
void
ARMMCExpr::visitUsedExpr
(
MCStreamer
&Streamer)
const
{
40
Streamer.
visitUsedExpr
(*
getSubExpr
());
41
}
MCContext.h
llvm::ARMMCExpr::create
static const ARMMCExpr * create(VariantKind Kind, const MCExpr *Expr, MCContext &Ctx)
Definition:
ARMMCExpr.cpp:19
llvm::MCExpr::getKind
ExprKind getKind() const
Definition:
MCExpr.h:69
MCAssembler.h
MCStreamer.h
llvm_unreachable
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
Definition:
ErrorHandling.h:98
llvm::MCExpr
Base class for the full range of assembler expressions which are needed for parsing.
Definition:
MCExpr.h:33
llvm::ARMMCExpr
Definition:
ARMMCExpr.h:17
llvm::ARMMCExpr::getSubExpr
const MCExpr * getSubExpr() const
getSubExpr - Get the child of this expression.
Definition:
ARMMCExpr.h:55
llvm::MCContext
Context object for machine code objects.
Definition:
MCContext.h:48
llvm::ARMMCExpr::visitUsedExpr
void visitUsedExpr(MCStreamer &Streamer) const override
Definition:
ARMMCExpr.cpp:39
llvm::MCAsmInfo
This class is intended to be used as a base class for asm properties and features specific to the tar...
Definition:
MCAsmInfo.h:58
llvm::MCExpr::print
void print(raw_ostream &OS, const MCAsmInfo *MAI) const
Definition:
MCExpr.cpp:33
llvm::MCStreamer
Streaming machine code generation interface.
Definition:
MCStreamer.h:157
llvm::ARMMCExpr::VariantKind
VariantKind
Definition:
ARMMCExpr.h:19
llvm::ARMMCExpr::VK_ARM_HI16
Definition:
ARMMCExpr.h:21
ARMMCExpr.h
llvm::MCStreamer::visitUsedExpr
void visitUsedExpr(const MCExpr &Expr)
Definition:
MCStreamer.cpp:613
llvm::ARMMCExpr::VK_ARM_LO16
Definition:
ARMMCExpr.h:22
llvm::ARMMCExpr::printImpl
void printImpl(raw_ostream &OS, const MCAsmInfo *MAI) const override
Definition:
ARMMCExpr.cpp:24
llvm::MCExpr::SymbolRef
References to labels and assigned expressions.
Definition:
MCExpr.h:38
Kind
const ARM::ArchExtKind Kind
Definition:
ARMAsmParser.cpp:9974
llvm::raw_ostream
This class implements an extremely fast bulk output stream that can only output to a stream...
Definition:
raw_ostream.h:38
Generated on Mon Aug 31 2015 10:59:10 for LLVM by
1.8.6