LLVM  8.0.1
Classes | Namespaces | Functions
MCDwarf.cpp File Reference
#include "llvm/MC/MCDwarf.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/Hashing.h"
#include "llvm/ADT/Optional.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/SmallString.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/ADT/Twine.h"
#include "llvm/BinaryFormat/Dwarf.h"
#include "llvm/Config/config.h"
#include "llvm/MC/MCAsmInfo.h"
#include "llvm/MC/MCContext.h"
#include "llvm/MC/MCExpr.h"
#include "llvm/MC/MCObjectFileInfo.h"
#include "llvm/MC/MCObjectStreamer.h"
#include "llvm/MC/MCRegisterInfo.h"
#include "llvm/MC/MCSection.h"
#include "llvm/MC/MCStreamer.h"
#include "llvm/MC/MCSymbol.h"
#include "llvm/MC/StringTableBuilder.h"
#include "llvm/Support/Casting.h"
#include "llvm/Support/Endian.h"
#include "llvm/Support/EndianStream.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/LEB128.h"
#include "llvm/Support/MathExtras.h"
#include "llvm/Support/Path.h"
#include "llvm/Support/SourceMgr.h"
#include "llvm/Support/raw_ostream.h"
#include <cassert>
#include <cstdint>
#include <string>
#include <utility>
#include <vector>
Include dependency graph for MCDwarf.cpp:

Go to the source code of this file.

Classes

class  llvm::MCDwarfLineStr
 Manage the .debug_line_str section contents, if we use it. More...
 
struct  llvm::DenseMapInfo< CIEKey >
 

Namespaces

 llvm
 This class represents lattice values for constants.
 

Functions

static uint64_t ScaleAddrDelta (MCContext &Context, uint64_t AddrDelta)
 
static const MCExprMakeStartMinusEndExpr (const MCStreamer &MCOS, const MCSymbol &Start, const MCSymbol &End, int IntVal)
 
static const MCExprmakeStartPlusIntExpr (MCContext &Ctx, const MCSymbol &Start, int IntVal)
 
static void EmitDwarfLineTable (MCObjectStreamer *MCOS, MCSection *Section, const MCLineSection::MCDwarfLineEntryCollection &LineEntries)
 
static const MCExprforceExpAbs (MCStreamer &OS, const MCExpr *Expr)
 
static void emitAbsValue (MCStreamer &OS, const MCExpr *Value, unsigned Size)
 
static void emitOneV5FileEntry (MCStreamer *MCOS, const MCDwarfFile &DwarfFile, bool EmitMD5, bool HasSource, Optional< MCDwarfLineStr > &LineStr)
 
static uint64_t SpecialAddr (MCDwarfLineTableParams Params, uint64_t op)
 Given a special op, return the address skip amount (in units of DWARF2_LINE_MIN_INSN_LENGTH). More...
 
static void EmitAbbrev (MCStreamer *MCOS, uint64_t Name, uint64_t Form)
 
static void EmitGenDwarfAbbrev (MCStreamer *MCOS)
 
static void EmitGenDwarfAranges (MCStreamer *MCOS, const MCSymbol *InfoSectionSymbol)
 
static void EmitGenDwarfInfo (MCStreamer *MCOS, const MCSymbol *AbbrevSectionSymbol, const MCSymbol *LineSectionSymbol, const MCSymbol *RangesSectionSymbol)
 
static void EmitGenDwarfRanges (MCStreamer *MCOS)
 
static int getDataAlignmentFactor (MCStreamer &streamer)
 
static unsigned getSizeForEncoding (MCStreamer &streamer, unsigned symbolEncoding)
 
static void emitFDESymbol (MCObjectStreamer &streamer, const MCSymbol &symbol, unsigned symbolEncoding, bool isEH)
 
static void EmitPersonality (MCStreamer &streamer, const MCSymbol &symbol, unsigned symbolEncoding)
 
static void emitEncodingByte (MCObjectStreamer &Streamer, unsigned Encoding)
 
static unsigned getCIEVersion (bool IsEH, unsigned DwarfVersion)
 

Function Documentation

◆ EmitAbbrev()

static void EmitAbbrev ( MCStreamer MCOS,
uint64_t  Name,
uint64_t  Form 
)
static

Definition at line 783 of file MCDwarf.cpp.

References llvm::MCStreamer::EmitULEB128IntValue().

Referenced by EmitGenDwarfAbbrev().

◆ emitAbsValue()

static void emitAbsValue ( MCStreamer OS,
const MCExpr Value,
unsigned  Size 
)
static

◆ EmitDwarfLineTable()

static void EmitDwarfLineTable ( MCObjectStreamer MCOS,
MCSection Section,
const MCLineSection::MCDwarfLineEntryCollection LineEntries 
)
inlinestatic

◆ emitEncodingByte()

static void emitEncodingByte ( MCObjectStreamer Streamer,
unsigned  Encoding 
)
static

Definition at line 1310 of file MCDwarf.cpp.

References llvm::MCDwarfFrameInfo::Begin, llvm::MCDwarfFrameInfo::CompactUnwindEncoding, Context, llvm::dwarf::DW_EH_PE_absptr, llvm::dwarf::DW_EH_PE_udata4, emitAbsValue(), llvm::MCStreamer::EmitIntValue(), llvm::MCDwarfFrameInfo::End, llvm::MCObjectFileInfo::getCompactUnwindDwarfEHFrameOnly(), getDataAlignmentFactor(), llvm::MCObjectFileInfo::getFDEEncoding(), llvm::MCCFIInstruction::getLabel(), llvm::MCContext::getObjectFileInfo(), llvm::MCCFIInstruction::getOffset(), llvm::MCCFIInstruction::getOperation(), llvm::MCCFIInstruction::getRegister(), llvm::MCCFIInstruction::getRegister2(), getSizeForEncoding(), llvm::MCCFIInstruction::getValues(), llvm::MCSymbol::isDefined(), llvm_unreachable, llvm::MCDwarfFrameInfo::Lsda, llvm::MCDwarfFrameInfo::LsdaEncoding, MakeStartMinusEndExpr(), MRI, llvm::MCCFIInstruction::OpAdjustCfaOffset, llvm::MCCFIInstruction::OpDefCfa, llvm::MCCFIInstruction::OpDefCfaOffset, llvm::MCCFIInstruction::OpDefCfaRegister, llvm::MCCFIInstruction::OpEscape, llvm::MCCFIInstruction::OpGnuArgsSize, llvm::MCCFIInstruction::OpNegateRAState, llvm::MCCFIInstruction::OpOffset, llvm::MCCFIInstruction::OpRegister, llvm::MCCFIInstruction::OpRelOffset, llvm::MCCFIInstruction::OpRememberState, llvm::MCCFIInstruction::OpRestore, llvm::MCCFIInstruction::OpRestoreState, llvm::MCCFIInstruction::OpSameValue, llvm::MCCFIInstruction::OpUndefined, llvm::MCCFIInstruction::OpWindowSave, llvm::MCDwarfFrameInfo::Personality, Reg, and Size.

Referenced by getCIEVersion().

◆ emitFDESymbol()

static void emitFDESymbol ( MCObjectStreamer streamer,
const MCSymbol symbol,
unsigned  symbolEncoding,
bool  isEH 
)
static

◆ EmitGenDwarfAbbrev()

static void EmitGenDwarfAbbrev ( MCStreamer MCOS)
static

◆ EmitGenDwarfAranges()

static void EmitGenDwarfAranges ( MCStreamer MCOS,
const MCSymbol InfoSectionSymbol 
)
static

◆ EmitGenDwarfInfo()

static void EmitGenDwarfInfo ( MCStreamer MCOS,
const MCSymbol AbbrevSectionSymbol,
const MCSymbol LineSectionSymbol,
const MCSymbol RangesSectionSymbol 
)
static

◆ EmitGenDwarfRanges()

static void EmitGenDwarfRanges ( MCStreamer MCOS)
static

◆ emitOneV5FileEntry()

static void emitOneV5FileEntry ( MCStreamer MCOS,
const MCDwarfFile DwarfFile,
bool  EmitMD5,
bool  HasSource,
Optional< MCDwarfLineStr > &  LineStr 
)
static

◆ EmitPersonality()

static void EmitPersonality ( MCStreamer streamer,
const MCSymbol symbol,
unsigned  symbolEncoding 
)
static

◆ forceExpAbs()

static const MCExpr* forceExpAbs ( MCStreamer OS,
const MCExpr Expr 
)
static

◆ getCIEVersion()

static unsigned getCIEVersion ( bool  IsEH,
unsigned  DwarfVersion 
)
static

◆ getDataAlignmentFactor()

static int getDataAlignmentFactor ( MCStreamer streamer)
static

◆ getSizeForEncoding()

static unsigned getSizeForEncoding ( MCStreamer streamer,
unsigned  symbolEncoding 
)
static

◆ MakeStartMinusEndExpr()

static const MCExpr* MakeStartMinusEndExpr ( const MCStreamer MCOS,
const MCSymbol Start,
const MCSymbol End,
int  IntVal 
)
inlinestatic

◆ makeStartPlusIntExpr()

static const MCExpr* makeStartPlusIntExpr ( MCContext Ctx,
const MCSymbol Start,
int  IntVal 
)
inlinestatic

Definition at line 138 of file MCDwarf.cpp.

Referenced by llvm::MCDwarfLineStr::emitRef().

◆ ScaleAddrDelta()

static uint64_t ScaleAddrDelta ( MCContext Context,
uint64_t  AddrDelta 
)
inlinestatic

◆ SpecialAddr()

static uint64_t SpecialAddr ( MCDwarfLineTableParams  Params,
uint64_t  op 
)
static

Given a special op, return the address skip amount (in units of DWARF2_LINE_MIN_INSN_LENGTH).

Definition at line 644 of file MCDwarf.cpp.

References llvm::MCDwarfLineTableParams::DWARF2LineOpcodeBase, and llvm::MCDwarfLineTableParams::DWARF2LineRange.

Referenced by llvm::MCDwarfLineAddr::Encode().