LLVM
4.0.0
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
llvm.src
lib
Object
RecordStreamer.h
Go to the documentation of this file.
1
//===-- RecordStreamer.h - Record asm defined and used symbols ---*- 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
#ifndef LLVM_LIB_OBJECT_RECORDSTREAMER_H
11
#define LLVM_LIB_OBJECT_RECORDSTREAMER_H
12
13
#include "
llvm/MC/MCStreamer.h
"
14
15
namespace
llvm {
16
class
RecordStreamer
:
public
MCStreamer
{
17
public
:
18
enum
State
{
NeverSeen
,
Global
,
Defined
,
DefinedGlobal
,
DefinedWeak
,
Used
,
19
UndefinedWeak
};
20
21
private
:
22
StringMap<State>
Symbols;
23
void
markDefined(
const
MCSymbol
&
Symbol
);
24
void
markGlobal(
const
MCSymbol
&
Symbol
,
MCSymbolAttr
Attribute
);
25
void
markUsed(
const
MCSymbol
&
Symbol
);
26
void
visitUsedSymbol(
const
MCSymbol
&Sym)
override
;
27
28
public
:
29
typedef
StringMap<State>::const_iterator
const_iterator
;
30
const_iterator
begin
();
31
const_iterator
end
();
32
RecordStreamer
(
MCContext
&Context);
33
void
EmitInstruction
(
const
MCInst
&Inst,
const
MCSubtargetInfo
&STI)
override
;
34
void
EmitLabel
(
MCSymbol
*
Symbol
)
override
;
35
void
EmitAssignment
(
MCSymbol
*
Symbol
,
const
MCExpr
*
Value
)
override
;
36
bool
EmitSymbolAttribute
(
MCSymbol
*
Symbol
,
MCSymbolAttr
Attribute
)
override
;
37
void
EmitZerofill
(
MCSection
*
Section
,
MCSymbol
*
Symbol
, uint64_t Size,
38
unsigned
ByteAlignment
)
override
;
39
void
EmitCommonSymbol
(
MCSymbol
*
Symbol
, uint64_t Size,
40
unsigned
ByteAlignment
)
override
;
41
};
42
}
43
#endif
llvm::MCSection
Instances of this class represent a uniqued identifier for a section in the current translation unit...
Definition:
MCSection.h:40
llvm::RecordStreamer::UndefinedWeak
Definition:
RecordStreamer.h:19
llvm::ARMBuildAttrs::Symbol
Definition:
ARMBuildAttributes.h:77
llvm::RecordStreamer::NeverSeen
Definition:
RecordStreamer.h:18
llvm::RecordStreamer::EmitZerofill
void EmitZerofill(MCSection *Section, MCSymbol *Symbol, uint64_t Size, unsigned ByteAlignment) override
Emit the zerofill section and an optional symbol.
Definition:
RecordStreamer.cpp:104
llvm::MCSymbol
MCSymbol - Instances of this class represent a symbol name in the MC file, and MCSymbols are created ...
Definition:
MCSymbol.h:39
llvm::RecordStreamer::EmitSymbolAttribute
bool EmitSymbolAttribute(MCSymbol *Symbol, MCSymbolAttr Attribute) override
Add the given Attribute to Symbol.
Definition:
RecordStreamer.cpp:95
llvm::RecordStreamer::EmitAssignment
void EmitAssignment(MCSymbol *Symbol, const MCExpr *Value) override
Emit an assignment of Value to Symbol.
Definition:
RecordStreamer.cpp:90
llvm::RecordStreamer::end
const_iterator end()
Definition:
RecordStreamer.cpp:76
MCStreamer.h
llvm::RecordStreamer
Definition:
RecordStreamer.h:16
llvm::MCExpr
Base class for the full range of assembler expressions which are needed for parsing.
Definition:
MCExpr.h:34
llvm::MCContext
Context object for machine code objects.
Definition:
MCContext.h:51
llvm::MCInst
Instances of this class represent a single low-level machine instruction.
Definition:
MCInst.h:150
llvm::MCStreamer
Streaming machine code generation interface.
Definition:
MCStreamer.h:161
llvm::RecordStreamer::RecordStreamer
RecordStreamer(MCContext &Context)
Definition:
RecordStreamer.cpp:78
llvm::RecordStreamer::EmitInstruction
void EmitInstruction(const MCInst &Inst, const MCSubtargetInfo &STI) override
Emit the given Instruction into the current section.
Definition:
RecordStreamer.cpp:80
llvm::RecordStreamer::DefinedWeak
Definition:
RecordStreamer.h:18
llvm::RecordStreamer::DefinedGlobal
Definition:
RecordStreamer.h:18
llvm::RecordStreamer::Defined
Definition:
RecordStreamer.h:18
llvm::LCOMM::ByteAlignment
Definition:
MCAsmInfo.h:46
llvm::ARMBuildAttrs::Section
Legacy Tags.
Definition:
ARMBuildAttributes.h:76
llvm::Attribute
Definition:
Attributes.h:48
llvm::RecordStreamer::Used
Definition:
RecordStreamer.h:18
llvm::MCSymbolAttr
MCSymbolAttr
Definition:
MCDirectives.h:19
llvm::StringMap< State >
llvm::RecordStreamer::Global
Definition:
RecordStreamer.h:18
llvm::RecordStreamer::State
State
Definition:
RecordStreamer.h:18
llvm::RecordStreamer::const_iterator
StringMap< State >::const_iterator const_iterator
Definition:
RecordStreamer.h:29
llvm::MCSubtargetInfo
MCSubtargetInfo - Generic base class for all target subtargets.
Definition:
MCSubtargetInfo.h:30
llvm::RecordStreamer::EmitCommonSymbol
void EmitCommonSymbol(MCSymbol *Symbol, uint64_t Size, unsigned ByteAlignment) override
Emit a common symbol.
Definition:
RecordStreamer.cpp:109
llvm::RecordStreamer::EmitLabel
void EmitLabel(MCSymbol *Symbol) override
Emit a label for Symbol into the current section.
Definition:
RecordStreamer.cpp:85
llvm::Value
LLVM Value Representation.
Definition:
Value.h:71
llvm::RecordStreamer::begin
const_iterator begin()
Definition:
RecordStreamer.cpp:72
Generated on Wed Mar 8 2017 17:21:04 for LLVM by
1.8.6