Assembles machine‐code sections, lays them out, and writes object files.

Synopsis

Declared in <llvm/MC/MCAssembler.h>

class MCAssembler;

Type Aliases

Name

Description

SectionListType

List of sections owned by this assembler.

const_iterator

Const iterator over sections in this assembler.

Member Functions

Name

Description

MCAssembler [constructor]

Constructors

operator= [deleted]

Deleted copy assignment operator.

Finish

Finish final processing and write the object to the output stream.

addRelocDirective

Record a relocation directive for later emission.

begin

Get an iterator to the first section.

computeFragmentSize

Compute the effective fragment size.

dump

Dump assembler state for debugging.

end

Get an iterator past the last section.

flushPendingErrors

Flush any pending errors recorded during layout.

getBackend

Get a reference to the assembler backend.

getBackendPtr

Get a pointer to the assembler backend, or null if none is set.

getBaseSymbol

If this symbol is equivalent to A + Constant, return A.

getBundleAlign

Get the bundle alignment when bundling is enabled.

getContext

Get the MC context associated with this assembler.

getDWARFLinetableParams

Get the DWARF line‐table parameters used by this assembler.

getEmitter

Get a reference to the code emitter.

getEmitterPtr

Get a pointer to the code emitter, or null if none is set.

getFragmentOffset

Get the offset of the given fragment inside its containing section.

getRelaxAll

Return whether all instructions should be fully relaxed.

getSectionAddressSize

Get the address size of a section in the current layout.

getSectionFileSize

Get the file size of a section in the current layout.

getStretch

Get the cumulative size stretch from the last layout iteration.

getSymbolOffset

getSymbolOffset overloads

getSymbols

Get the mutable list of registered symbols.

getWriter

Get a reference to the object writer.

hasFinalLayout

Return true if the final layout has been computed.

hasLayout

Return true if a layout has been computed.

isBundlingEnabled

Return true if aligned instruction bundling is enabled.

isThumbFunc

Check whether a given symbol has been flagged with .thumb_func.

layout

Layout all sections and prepare them for emission.

recordError

Record a pending error during layout iteration.

registerSection

Register a section with this assembler.

registerSymbol

Register a symbol with this assembler.

reportError

Report an error at the given source location.

reset

Reuse an assembler instance

setBundleAlign

Enable bundling and set the required bundle alignment.

setIsThumbFunc

Flag a function symbol as the target of a .thumb_func directive.

setRelaxAll

Set whether all instructions should be fully relaxed.

symbols

Get a range over the registered symbols.

writeSectionData

Emit the section contents to OS.

Friends

Name

Description

llvm::MCObjectWriter

Defines the object file and target independent interfaces used by the assembler backend to write native file format object files.

Created with MrDocs