LLVM API Documentation
#include "llvm/MC/MCDwarf.h"
#include "llvm/ADT/Hashing.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/SmallString.h"
#include "llvm/ADT/Twine.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/MCSymbol.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/LEB128.h"
#include "llvm/Support/Path.h"
#include "llvm/Support/SourceMgr.h"
#include "llvm/Support/raw_ostream.h"
Go to the source code of this file.
#define DWARF2_LINE_BASE -5 |
Definition at line 46 of file MCDwarf.cpp.
Referenced by llvm::MCDwarfLineTableHeader::Emit(), and llvm::MCDwarfLineAddr::Encode().
#define DWARF2_LINE_OPCODE_BASE 13 |
Definition at line 42 of file MCDwarf.cpp.
Referenced by llvm::MCDwarfLineTableHeader::Emit(), and llvm::MCDwarfLineAddr::Encode().
#define DWARF2_LINE_RANGE 14 |
Definition at line 49 of file MCDwarf.cpp.
Referenced by llvm::MCDwarfLineTableHeader::Emit(), and llvm::MCDwarfLineAddr::Encode().
#define MAX_SPECIAL_ADDR_DELTA SPECIAL_ADDR(255) |
Definition at line 37 of file MCDwarf.cpp.
Referenced by llvm::MCDwarfLineAddr::Encode().
#define SPECIAL_ADDR | ( | op | ) | (((op) - DWARF2_LINE_OPCODE_BASE)/DWARF2_LINE_RANGE) |
Definition at line 34 of file MCDwarf.cpp.
static void EmitAbbrev | ( | MCStreamer * | MCOS, |
uint64_t | Name, | ||
uint64_t | Form | ||
) | [static] |
Definition at line 523 of file MCDwarf.cpp.
References llvm::MCStreamer::EmitULEB128IntValue().
Referenced by EmitGenDwarfAbbrev().
static void emitAbsValue | ( | MCStreamer & | OS, |
const MCExpr * | Value, | ||
unsigned | Size | ||
) | [static] |
Definition at line 261 of file MCDwarf.cpp.
References SISrcMods::ABS, llvm::MCStreamer::EmitValue(), and forceExpAbs().
Referenced by llvm::MCDwarfLineTableHeader::Emit(), emitFDESymbol(), EmitGenDwarfAranges(), EmitGenDwarfInfo(), and EmitGenDwarfRanges().
static void EmitDwarfLineTable | ( | MCObjectStreamer * | MCOS, |
const MCSection * | Section, | ||
const MCLineSection::MCLineEntryCollection & | LineEntries | ||
) | [inline, static] |
Definition at line 118 of file MCDwarf.cpp.
References llvm::MCContext::CreateTempSymbol(), llvm::dwarf::DW_LNE_set_discriminator, llvm::dwarf::DW_LNS_extended_op, llvm::dwarf::DW_LNS_negate_stmt, llvm::dwarf::DW_LNS_set_basic_block, llvm::dwarf::DW_LNS_set_column, llvm::dwarf::DW_LNS_set_epilogue_begin, llvm::dwarf::DW_LNS_set_file, llvm::dwarf::DW_LNS_set_isa, llvm::dwarf::DW_LNS_set_prologue_end, DWARF2_FLAG_BASIC_BLOCK, DWARF2_FLAG_EPILOGUE_BEGIN, DWARF2_FLAG_IS_STMT, DWARF2_FLAG_PROLOGUE_END, DWARF2_LINE_DEFAULT_IS_STMT, llvm::MCObjectStreamer::EmitDwarfAdvanceLineAddr(), llvm::MCStreamer::EmitIntValue(), llvm::MCObjectStreamer::EmitLabel(), llvm::MCStreamer::EmitULEB128IntValue(), llvm::MCContext::getAsmInfo(), llvm::MCStreamer::getContext(), llvm::MCObjectFileInfo::getDwarfLineSection(), llvm::MCContext::getObjectFileInfo(), llvm::MCAsmInfo::getPointerSize(), llvm::getULEB128Size(), INT64_MAX, and llvm::MCStreamer::SwitchSection().
Referenced by llvm::MCDwarfLineTable::EmitCU().
static void emitEncodingByte | ( | MCObjectStreamer & | Streamer, |
unsigned | Encoding | ||
) | [static] |
Definition at line 1051 of file MCDwarf.cpp.
References llvm::MCStreamer::EmitIntValue().
static void emitFDESymbol | ( | MCObjectStreamer & | streamer, |
const MCSymbol & | symbol, | ||
unsigned | symbolEncoding, | ||
bool | isEH | ||
) | [static] |
Definition at line 992 of file MCDwarf.cpp.
References llvm::MCAsmInfo::doDwarfFDESymbolsUseAbsDiff(), emitAbsValue(), llvm::MCStreamer::EmitValue(), llvm::MCContext::getAsmInfo(), llvm::MCStreamer::getContext(), llvm::MCAsmInfo::getExprForFDESymbol(), and getSizeForEncoding().
static void EmitGenDwarfAbbrev | ( | MCStreamer * | MCOS | ) | [static] |
Definition at line 530 of file MCDwarf.cpp.
References llvm::dwarf::DW_AT_APPLE_flags, llvm::dwarf::DW_AT_comp_dir, llvm::dwarf::DW_AT_decl_file, llvm::dwarf::DW_AT_decl_line, llvm::dwarf::DW_AT_high_pc, llvm::dwarf::DW_AT_language, llvm::dwarf::DW_AT_low_pc, llvm::dwarf::DW_AT_name, llvm::dwarf::DW_AT_producer, llvm::dwarf::DW_AT_prototyped, llvm::dwarf::DW_AT_ranges, llvm::dwarf::DW_AT_stmt_list, llvm::dwarf::DW_CHILDREN_no, llvm::dwarf::DW_CHILDREN_yes, llvm::dwarf::DW_FORM_addr, llvm::dwarf::DW_FORM_data2, llvm::dwarf::DW_FORM_data4, llvm::dwarf::DW_FORM_flag, llvm::dwarf::DW_FORM_string, llvm::dwarf::DW_TAG_compile_unit, llvm::dwarf::DW_TAG_label, llvm::dwarf::DW_TAG_unspecified_parameters, EmitAbbrev(), llvm::MCStreamer::EmitIntValue(), llvm::MCStreamer::EmitULEB128IntValue(), llvm::StringRef::empty(), llvm::MCContext::getCompilationDir(), llvm::MCStreamer::getContext(), llvm::MCObjectFileInfo::getDwarfAbbrevSection(), llvm::MCContext::getDwarfDebugFlags(), llvm::MCContext::getGenDwarfSectionSyms(), llvm::MCContext::getObjectFileInfo(), llvm::MapVector< KeyT, ValueT, MapType, VectorType >::size(), and llvm::MCStreamer::SwitchSection().
Referenced by llvm::MCGenDwarfInfo::Emit().
static void EmitGenDwarfAranges | ( | MCStreamer * | MCOS, |
const MCSymbol * | InfoSectionSymbol | ||
) | [static] |
Definition at line 580 of file MCDwarf.cpp.
References llvm::MCSymbolRefExpr::Create(), emitAbsValue(), llvm::MCStreamer::EmitIntValue(), llvm::MCStreamer::EmitSymbolValue(), llvm::MCStreamer::EmitValue(), llvm::MCContext::getAsmInfo(), llvm::MCStreamer::getContext(), llvm::MCObjectFileInfo::getDwarfARangesSection(), llvm::MCContext::getGenDwarfSectionSyms(), llvm::MCContext::getObjectFileInfo(), llvm::MCAsmInfo::getPointerSize(), MakeStartMinusEndExpr(), llvm::MCAsmInfo::needsDwarfSectionOffsetDirective(), llvm::MCStreamer::SwitchSection(), and llvm::MCSymbolRefExpr::VK_None.
Referenced by llvm::MCGenDwarfInfo::Emit().
static void EmitGenDwarfInfo | ( | MCStreamer * | MCOS, |
const MCSymbol * | AbbrevSectionSymbol, | ||
const MCSymbol * | LineSectionSymbol, | ||
const MCSymbol * | RangesSectionSymbol | ||
) | [static] |
Definition at line 652 of file MCDwarf.cpp.
References llvm::MapVector< KeyT, ValueT, MapType, VectorType >::begin(), llvm::MCSymbolRefExpr::Create(), llvm::MCContext::CreateTempSymbol(), llvm::dwarf::DW_LANG_Mips_Assembler, emitAbsValue(), llvm::MCStreamer::EmitBytes(), llvm::MCStreamer::EmitIntValue(), llvm::MCStreamer::EmitLabel(), llvm::MCStreamer::EmitSymbolValue(), llvm::MCStreamer::EmitULEB128IntValue(), llvm::MCStreamer::EmitValue(), llvm::StringRef::empty(), llvm::sys::path::get_separator(), llvm::MCContext::getAsmInfo(), llvm::MCContext::getCompilationDir(), llvm::MCStreamer::getContext(), llvm::MCContext::getDwarfDebugFlags(), llvm::MCContext::getDwarfDebugProducer(), llvm::MCObjectFileInfo::getDwarfInfoSection(), llvm::MCContext::getDwarfVersion(), llvm::MCContext::getGenDwarfSectionSyms(), llvm::MCContext::getMCDwarfDirs(), llvm::MCContext::getMCDwarfFiles(), llvm::MCContext::getMCGenDwarfLabelEntries(), llvm::MCContext::getObjectFileInfo(), llvm::MCAsmInfo::getPointerSize(), MakeStartMinusEndExpr(), Name, llvm::MCAsmInfo::needsDwarfSectionOffsetDirective(), PACKAGE_VERSION, llvm::SmallVectorTemplateCommon< T, typename >::size(), llvm::MCStreamer::SwitchSection(), and llvm::MCSymbolRefExpr::VK_None.
Referenced by llvm::MCGenDwarfInfo::Emit().
static void EmitGenDwarfRanges | ( | MCStreamer * | MCOS | ) | [static] |
Definition at line 816 of file MCDwarf.cpp.
References llvm::MCSymbolRefExpr::Create(), emitAbsValue(), llvm::MCStreamer::EmitFill(), llvm::MCStreamer::EmitIntValue(), llvm::MCStreamer::EmitValue(), llvm::MCContext::getAsmInfo(), llvm::MCStreamer::getContext(), llvm::MCObjectFileInfo::getDwarfRangesSection(), llvm::MCContext::getGenDwarfSectionSyms(), llvm::MCContext::getObjectFileInfo(), llvm::MCAsmInfo::getPointerSize(), MakeStartMinusEndExpr(), llvm::COFF::SectionSize, llvm::MCStreamer::SwitchSection(), and llvm::MCSymbolRefExpr::VK_None.
Referenced by llvm::MCGenDwarfInfo::Emit().
static void EmitPersonality | ( | MCStreamer & | streamer, |
const MCSymbol & | symbol, | ||
unsigned | symbolEncoding | ||
) | [static] |
Definition at line 1006 of file MCDwarf.cpp.
References llvm::MCStreamer::EmitValue(), llvm::MCContext::getAsmInfo(), llvm::MCStreamer::getContext(), llvm::MCAsmInfo::getExprForPersonalitySymbol(), and getSizeForEncoding().
static const MCExpr* forceExpAbs | ( | MCStreamer & | OS, |
const MCExpr * | Expr | ||
) | [static] |
Definition at line 250 of file MCDwarf.cpp.
References SISrcMods::ABS, llvm::MCSymbolRefExpr::Create(), llvm::MCContext::CreateTempSymbol(), llvm::MCStreamer::EmitAssignment(), llvm::MCContext::getAsmInfo(), llvm::MCStreamer::getContext(), and llvm::MCAsmInfo::hasAggressiveSymbolFolding().
Referenced by emitAbsValue().
static int getDataAlignmentFactor | ( | MCStreamer & | streamer | ) | [static] |
Definition at line 961 of file MCDwarf.cpp.
References llvm::MCContext::getAsmInfo(), llvm::MCAsmInfo::getCalleeSaveStackSlotSize(), llvm::MCStreamer::getContext(), and llvm::MCAsmInfo::isStackGrowthDirectionUp().
static unsigned getSizeForEncoding | ( | MCStreamer & | streamer, |
unsigned | symbolEncoding | ||
) | [static] |
Definition at line 971 of file MCDwarf.cpp.
References llvm::dwarf::DW_EH_PE_absptr, llvm::dwarf::DW_EH_PE_sdata2, llvm::dwarf::DW_EH_PE_sdata4, llvm::dwarf::DW_EH_PE_sdata8, llvm::dwarf::DW_EH_PE_signed, llvm::dwarf::DW_EH_PE_udata2, llvm::dwarf::DW_EH_PE_udata4, llvm::dwarf::DW_EH_PE_udata8, llvm::format(), llvm::MCContext::getAsmInfo(), llvm::MCStreamer::getContext(), llvm::MCAsmInfo::getPointerSize(), and llvm_unreachable.
Referenced by emitFDESymbol(), and EmitPersonality().
static const MCExpr* MakeStartMinusEndExpr | ( | const MCStreamer & | MCOS, |
const MCSymbol & | Start, | ||
const MCSymbol & | End, | ||
int | IntVal | ||
) | [inline, static] |
Definition at line 95 of file MCDwarf.cpp.
References llvm::MCConstantExpr::Create(), llvm::MCSymbolRefExpr::Create(), llvm::MCBinaryExpr::Create(), llvm::MCStreamer::getContext(), llvm::MCBinaryExpr::Sub, and llvm::MCSymbolRefExpr::VK_None.
Referenced by llvm::MCDwarfLineTableHeader::Emit(), EmitGenDwarfAranges(), EmitGenDwarfInfo(), and EmitGenDwarfRanges().
static uint64_t ScaleAddrDelta | ( | MCContext & | Context, |
uint64_t | AddrDelta | ||
) | [inline, static] |
Definition at line 51 of file MCDwarf.cpp.
References llvm::MCContext::getAsmInfo(), and llvm::MCAsmInfo::getMinInstAlignment().
Referenced by llvm::MCDwarfLineAddr::Encode(), and llvm::MCDwarfFrameEmitter::EncodeAdvanceLoc().