LLVM API Documentation

Public Member Functions | Protected Member Functions | Protected Attributes
llvm::MCWinCOFFStreamer Class Reference

#include <MCWinCOFFStreamer.h>

Inheritance diagram for llvm::MCWinCOFFStreamer:
Inheritance graph
[legend]
Collaboration diagram for llvm::MCWinCOFFStreamer:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 MCWinCOFFStreamer (MCContext &Context, MCAsmBackend &MAB, MCCodeEmitter &CE, raw_ostream &OS)
void reset () override
 state management
MCStreamer interface
void InitSections () override
 Create the default sections and set the initial one.
void EmitLabel (MCSymbol *Symbol) override
void EmitAssemblerFlag (MCAssemblerFlag Flag) override
 EmitAssemblerFlag - Note in the output the specified Flag.
void EmitThumbFunc (MCSymbol *Func) override
bool EmitSymbolAttribute (MCSymbol *Symbol, MCSymbolAttr Attribute) override
 EmitSymbolAttribute - Add the given Attribute to Symbol.
void EmitSymbolDesc (MCSymbol *Symbol, unsigned DescValue) override
void BeginCOFFSymbolDef (MCSymbol const *Symbol) override
void EmitCOFFSymbolStorageClass (int StorageClass) override
void EmitCOFFSymbolType (int Type) override
void EndCOFFSymbolDef () override
 EndCOFFSymbolDef - Marks the end of the symbol definition.
void EmitCOFFSectionIndex (MCSymbol const *Symbol) override
void EmitCOFFSecRel32 (MCSymbol const *Symbol) override
void EmitELFSize (MCSymbol *Symbol, const MCExpr *Value) override
void EmitCommonSymbol (MCSymbol *Symbol, uint64_t Size, unsigned ByteAlignment) override
void EmitLocalCommonSymbol (MCSymbol *Symbol, uint64_t Size, unsigned ByteAlignment) override
void EmitZerofill (const MCSection *Section, MCSymbol *Symbol, uint64_t Size, unsigned ByteAlignment) override
void EmitTBSSSymbol (const MCSection *Section, MCSymbol *Symbol, uint64_t Size, unsigned ByteAlignment) override
void EmitFileDirective (StringRef Filename) override
void EmitIdent (StringRef IdentString) override
void EmitWinEHHandlerData () override
void FinishImpl () override
 FinishImpl - Streamer specific finalization.

Protected Member Functions

void EmitInstToData (const MCInst &Inst, const MCSubtargetInfo &STI) override

Protected Attributes

const MCSymbolCurSymbol

Detailed Description

Definition at line 28 of file MCWinCOFFStreamer.h.


Constructor & Destructor Documentation

Definition at line 40 of file WinCOFFStreamer.cpp.


Member Function Documentation

void llvm::MCWinCOFFStreamer::BeginCOFFSymbolDef ( MCSymbol const Symbol) [override, virtual]

BeginCOFFSymbolDef - Start emitting COFF symbol definition

Parameters:
Symbol- The symbol to have its External & Type fields set.

Reimplemented from llvm::MCStreamer.

Definition at line 120 of file WinCOFFStreamer.cpp.

References CurSymbol, llvm::MCSymbol::getSection(), llvm::MCSection::getVariant(), llvm::MCSymbol::isInSection(), llvm::MCSection::SV_COFF, and llvm::ARMBuildAttrs::Symbol.

void llvm::MCWinCOFFStreamer::EmitAssemblerFlag ( MCAssemblerFlag  Flag) [override, virtual]

EmitAssemblerFlag - Note in the output the specified Flag.

Reimplemented from llvm::MCStreamer.

Definition at line 84 of file WinCOFFStreamer.cpp.

References llvm_unreachable.

void llvm::MCWinCOFFStreamer::EmitCOFFSecRel32 ( MCSymbol const Symbol) [override, virtual]
void llvm::MCWinCOFFStreamer::EmitCOFFSectionIndex ( MCSymbol const Symbol) [override, virtual]
void llvm::MCWinCOFFStreamer::EmitCOFFSymbolStorageClass ( int  StorageClass) [override, virtual]

EmitCOFFSymbolStorageClass - Emit the storage class of the symbol.

Parameters:
StorageClass- The storage class the symbol should have.

Reimplemented from llvm::MCStreamer.

Definition at line 131 of file WinCOFFStreamer.cpp.

References CurSymbol, llvm::MCObjectStreamer::getAssembler(), llvm::MCAssembler::getOrCreateSymbolData(), llvm::itostr(), llvm::MCSymbolData::modifyFlags(), llvm::COFF::SF_ClassMask, and llvm::COFF::SF_ClassShift.

void llvm::MCWinCOFFStreamer::EmitCOFFSymbolType ( int  Type) [override, virtual]

EmitCOFFSymbolType - Emit the type of the symbol.

Parameters:
Type- A COFF type identifier (see COFF::SymbolType in X86COFF.h)

Reimplemented from llvm::MCStreamer.

Definition at line 143 of file WinCOFFStreamer.cpp.

References CurSymbol, llvm::MCObjectStreamer::getAssembler(), llvm::MCAssembler::getOrCreateSymbolData(), llvm::itostr(), llvm::MCSymbolData::modifyFlags(), llvm::COFF::SF_TypeMask, and llvm::COFF::SF_TypeShift.

void llvm::MCWinCOFFStreamer::EmitCommonSymbol ( MCSymbol Symbol,
uint64_t  Size,
unsigned  ByteAlignment 
) [override, virtual]

EmitCommonSymbol - Emit a common symbol.

Parameters:
Symbol- The common symbol to emit.
Size- The size of the common symbol.
ByteAlignment- The alignment of the symbol if non-zero. This must be a power of 2.

Implements llvm::MCStreamer.

Definition at line 180 of file WinCOFFStreamer.cpp.

References llvm::MCStreamer::AssignSection(), llvm::MCObjectStreamer::getAssembler(), llvm::MCAssembler::getOrCreateSymbolData(), llvm::MCSymbol::getSection(), llvm::MCSection::getVariant(), llvm::MCSymbol::isInSection(), llvm::report_fatal_error(), llvm::MCSymbolData::setCommon(), llvm::MCSymbolData::setExternal(), and llvm::MCSection::SV_COFF.

void llvm::MCWinCOFFStreamer::EmitELFSize ( MCSymbol Symbol,
const MCExpr Value 
) [override, virtual]

EmitELFSize - Emit an ELF .size directive.

This corresponds to an assembler statement such as: .size symbol, expression

Reimplemented from llvm::MCStreamer.

Definition at line 176 of file WinCOFFStreamer.cpp.

References llvm_unreachable.

void llvm::MCWinCOFFStreamer::EmitFileDirective ( StringRef  Filename) [override, virtual]

EmitFileDirective - Switch to a new logical file. This is used to implement the '.file "foo.c"' assembler directive.

Reimplemented from llvm::MCStreamer.

Definition at line 231 of file WinCOFFStreamer.cpp.

References llvm::MCAssembler::addFileName(), and llvm::MCObjectStreamer::getAssembler().

void llvm::MCWinCOFFStreamer::EmitIdent ( StringRef  IdentString) [override, virtual]

Emit the "identifiers" directive. This implements the '.ident "version foo"' assembler directive.

Reimplemented from llvm::MCStreamer.

Definition at line 236 of file WinCOFFStreamer.cpp.

References llvm_unreachable.

void llvm::MCWinCOFFStreamer::EmitInstToData ( const MCInst Inst,
const MCSubtargetInfo STI 
) [override, protected, virtual]
void llvm::MCWinCOFFStreamer::EmitLabel ( MCSymbol Symbol) [override, virtual]

EmitLabel - Emit a label for Symbol into the current section.

This corresponds to an assembler statement such as: foo:

Parameters:
Symbol- The symbol to emit. A given symbol should only be emitted as a label once, and symbols emitted as a label should never be used in an assignment.

Reimplemented from llvm::MCObjectStreamer.

Definition at line 79 of file WinCOFFStreamer.cpp.

References llvm::MCSymbol::isUndefined().

void llvm::MCWinCOFFStreamer::EmitLocalCommonSymbol ( MCSymbol Symbol,
uint64_t  Size,
unsigned  ByteAlignment 
) [override, virtual]
bool llvm::MCWinCOFFStreamer::EmitSymbolAttribute ( MCSymbol Symbol,
MCSymbolAttr  Attribute 
) [override, virtual]
void llvm::MCWinCOFFStreamer::EmitSymbolDesc ( MCSymbol Symbol,
unsigned  DescValue 
) [override, virtual]

EmitSymbolDesc - Set the DescValue for the Symbol.

Parameters:
Symbol- The symbol to have its n_desc field set.
DescValue- The value to set into the n_desc field.

Reimplemented from llvm::MCStreamer.

Definition at line 116 of file WinCOFFStreamer.cpp.

References llvm_unreachable.

void llvm::MCWinCOFFStreamer::EmitTBSSSymbol ( const MCSection Section,
MCSymbol Symbol,
uint64_t  Size,
unsigned  ByteAlignment 
) [override, virtual]

EmitTBSSSymbol - Emit a thread local bss (.tbss) symbol.

Parameters:
Section- The thread local common section.
Symbol- The thread local common symbol to emit.
Size- The size of the symbol.
ByteAlignment- The alignment of the thread local common symbol if non-zero. This must be a power of 2 on some targets.

Reimplemented from llvm::MCStreamer.

Definition at line 225 of file WinCOFFStreamer.cpp.

References llvm_unreachable.

void llvm::MCWinCOFFStreamer::EmitThumbFunc ( MCSymbol Func) [override, virtual]

EmitThumbFunc - Note in the output that the specified Func is a Thumb mode function (ARM target only).

Reimplemented from llvm::MCStreamer.

Definition at line 88 of file WinCOFFStreamer.cpp.

References llvm_unreachable.

void llvm::MCWinCOFFStreamer::EmitWinEHHandlerData ( ) [override, virtual]

Reimplemented from llvm::MCStreamer.

Definition at line 240 of file WinCOFFStreamer.cpp.

References llvm_unreachable.

void llvm::MCWinCOFFStreamer::EmitZerofill ( const MCSection Section,
MCSymbol Symbol,
uint64_t  Size,
unsigned  ByteAlignment 
) [override, virtual]

EmitZerofill - Emit the zerofill section and an optional symbol.

Parameters:
Section- The zerofill section to create and or to put the symbol
Symbol- The zerofill symbol to emit, if non-NULL.
Size- The size of the zerofill symbol.
ByteAlignment- The alignment of the zerofill symbol if non-zero. This must be a power of 2 on some targets.

Implements llvm::MCStreamer.

Definition at line 219 of file WinCOFFStreamer.cpp.

References llvm_unreachable.

void llvm::MCWinCOFFStreamer::EndCOFFSymbolDef ( ) [override, virtual]

EndCOFFSymbolDef - Marks the end of the symbol definition.

Reimplemented from llvm::MCStreamer.

Definition at line 154 of file WinCOFFStreamer.cpp.

References CurSymbol.

void llvm::MCWinCOFFStreamer::FinishImpl ( ) [override, virtual]

FinishImpl - Streamer specific finalization.

Reimplemented from llvm::MCObjectStreamer.

Definition at line 244 of file WinCOFFStreamer.cpp.

void llvm::MCWinCOFFStreamer::InitSections ( ) [override, virtual]

Create the default sections and set the initial one.

Reimplemented from llvm::MCStreamer.

Definition at line 63 of file WinCOFFStreamer.cpp.

References llvm::MCObjectStreamer::EmitCodeAlignment(), llvm::MCStreamer::getContext(), and llvm::MCStreamer::SwitchSection().

void llvm::MCWinCOFFStreamer::reset ( ) [inline, override, virtual]

state management

Reimplemented from llvm::MCObjectStreamer.

Definition at line 34 of file MCWinCOFFStreamer.h.

References CurSymbol.


Member Data Documentation


The documentation for this class was generated from the following files: