LLVM API Documentation

Namespaces | Defines | Functions
MCAssembler.cpp File Reference
#include "llvm/MC/MCAssembler.h"
#include "llvm/ADT/Statistic.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/ADT/Twine.h"
#include "llvm/MC/MCAsmBackend.h"
#include "llvm/MC/MCAsmLayout.h"
#include "llvm/MC/MCCodeEmitter.h"
#include "llvm/MC/MCContext.h"
#include "llvm/MC/MCDwarf.h"
#include "llvm/MC/MCExpr.h"
#include "llvm/MC/MCFixupKindInfo.h"
#include "llvm/MC/MCObjectWriter.h"
#include "llvm/MC/MCSection.h"
#include "llvm/MC/MCSymbol.h"
#include "llvm/MC/MCValue.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/LEB128.h"
#include "llvm/Support/TargetRegistry.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/MC/MCSectionELF.h"
#include <tuple>
Include dependency graph for MCAssembler.cpp:

Go to the source code of this file.

Namespaces

namespace  stats
namespace  llvm
 

List of target independent CodeGen pass IDs.


Defines

#define DEBUG_TYPE   "assembler"

Functions

static bool getLabelOffset (const MCAsmLayout &Layout, const MCSymbolData &SD, bool ReportError, uint64_t &Val)
static bool getSymbolOffsetImpl (const MCAsmLayout &Layout, const MCSymbolData *SD, bool ReportError, uint64_t &Val)
static bool evaluate (const MCExpr &Expr, const MCAsmLayout &Layout, const MCFixup &Fixup, MCValue &Target)
static void writeFragmentContents (const MCFragment &F, MCObjectWriter *OW)
 Write the contents of a fragment to the given object writer. Expects a MCEncodedFragment.
static void writeFragment (const MCAssembler &Asm, const MCAsmLayout &Layout, const MCFragment &F)
 Write the fragment F to the output file.
raw_ostreamllvm::operator<< (raw_ostream &OS, const MCFixup &AF)

Define Documentation

#define DEBUG_TYPE   "assembler"

Definition at line 34 of file MCAssembler.cpp.


Function Documentation

static bool evaluate ( const MCExpr Expr,
const MCAsmLayout Layout,
const MCFixup Fixup,
MCValue Target 
) [static]
static bool getLabelOffset ( const MCAsmLayout Layout,
const MCSymbolData SD,
bool  ReportError,
uint64_t &  Val 
) [static]
static bool getSymbolOffsetImpl ( const MCAsmLayout Layout,
const MCSymbolData SD,
bool  ReportError,
uint64_t &  Val 
) [static]
static void writeFragment ( const MCAssembler Asm,
const MCAsmLayout Layout,
const MCFragment F 
) [static]

Write the fragment F to the output file.

Definition at line 639 of file MCAssembler.cpp.

References llvm::MCFragment::alignToBundleEnd(), llvm::MCAssembler::computeFragmentSize(), F(), llvm::MCFragment::FT_Align, llvm::MCFragment::FT_CompactEncodedInst, llvm::MCFragment::FT_Data, llvm::MCFragment::FT_Dwarf, llvm::MCFragment::FT_DwarfFrame, llvm::MCFragment::FT_Fill, llvm::MCFragment::FT_LEB, llvm::MCFragment::FT_Org, llvm::MCFragment::FT_Relaxable, llvm::MCAssembler::getBackend(), llvm::MCAssembler::getBundleAlignSize(), llvm::MCFragment::getBundlePadding(), llvm::MCLEBFragment::getContents(), llvm::MCDwarfLineAddrFragment::getContents(), llvm::MCDwarfCallFrameFragment::getContents(), llvm::MCFragment::getKind(), llvm::MCFillFragment::getSize(), llvm::MCObjectWriter::getStream(), llvm::MCAlignFragment::getValue(), llvm::MCFillFragment::getValue(), llvm::MCOrgFragment::getValue(), llvm::MCAlignFragment::getValueSize(), llvm::MCFillFragment::getValueSize(), llvm::MCAssembler::getWriter(), llvm::MCAlignFragment::hasEmitNops(), llvm::MCFragment::hasInstructions(), llvm::MCAssembler::isBundlingEnabled(), llvm_unreachable, llvm::report_fatal_error(), llvm::SmallString< InternalLen >::str(), llvm::raw_ostream::tell(), llvm::MCObjectWriter::Write16(), llvm::MCObjectWriter::Write32(), llvm::MCObjectWriter::Write64(), llvm::MCObjectWriter::Write8(), llvm::MCObjectWriter::WriteBytes(), writeFragmentContents(), and llvm::MCAsmBackend::writeNopData().

Referenced by llvm::MCAssembler::writeSectionData().

static void writeFragmentContents ( const MCFragment F,
MCObjectWriter OW 
) [static]

Write the contents of a fragment to the given object writer. Expects a MCEncodedFragment.

Definition at line 633 of file MCAssembler.cpp.

References F(), llvm::MCEncodedFragment::getContents(), and llvm::MCObjectWriter::WriteBytes().

Referenced by writeFragment().