LLVM API Documentation
#include <DwarfPrinter.h>
Public Member Functions | |
| const AsmPrinter * | getAsm () const |
| MachineModuleInfo * | getMMI () const |
| const TargetAsmInfo * | getTargetAsmInfo () const |
| const TargetData * | getTargetData () const |
| void | PrintRelDirective (bool Force32Bit=false, bool isInSection=false) const |
| void | PrintLabelName (const DWLabel &Label) const |
| void | PrintLabelName (const char *Tag, unsigned Number) const |
| void | PrintLabelName (const char *Tag, unsigned Number, const char *Suffix) const |
| void | EmitLabel (const DWLabel &Label) const |
| void | EmitLabel (const char *Tag, unsigned Number) const |
| void | EmitReference (const DWLabel &Label, bool IsPCRelative=false, bool Force32Bit=false) const |
| void | EmitReference (const char *Tag, unsigned Number, bool IsPCRelative=false, bool Force32Bit=false) const |
| void | EmitReference (const std::string &Name, bool IsPCRelative=false, bool Force32Bit=false) const |
| void | EmitDifference (const DWLabel &LabelHi, const DWLabel &LabelLo, bool IsSmall=false) |
| void | EmitDifference (const char *TagHi, unsigned NumberHi, const char *TagLo, unsigned NumberLo, bool IsSmall=false) |
| void | EmitSectionOffset (const char *Label, const char *Section, unsigned LabelNumber, unsigned SectionNumber, bool IsSmall=false, bool isEH=false, bool useSet=true) |
| void | EmitFrameMoves (const char *BaseLabel, unsigned BaseLabelID, const std::vector< MachineMove > &Moves, bool isEH) |
Protected Member Functions | |
| Dwarf (raw_ostream &OS, AsmPrinter *A, const TargetAsmInfo *T, const char *flavor) | |
Protected Attributes | |
| raw_ostream & | O |
| AsmPrinter * | Asm |
| const TargetAsmInfo * | TAI |
| const TargetData * | TD |
| const TargetRegisterInfo * | RI |
| Module * | M |
| MachineFunction * | MF |
| MachineModuleInfo * | MMI |
| unsigned | SubprogramCount |
| const char *const | Flavor |
| unsigned | SetCounter |
Definition at line 32 of file DwarfPrinter.h.
| Dwarf::Dwarf | ( | raw_ostream & | OS, | |
| AsmPrinter * | A, | |||
| const TargetAsmInfo * | T, | |||
| const char * | flavor | |||
| ) | [protected] |
Definition at line 29 of file DwarfPrinter.cpp.
| const AsmPrinter* llvm::Dwarf::getAsm | ( | ) | const [inline] |
Definition at line 89 of file DwarfPrinter.h.
Referenced by llvm::DIEEntry::EmitValue(), llvm::DIEInteger::EmitValue(), llvm::DIEString::EmitValue(), llvm::DIEBlock::EmitValue(), and llvm::DwarfException::EndFunction().
| MachineModuleInfo* llvm::Dwarf::getMMI | ( | ) | const [inline] |
Definition at line 90 of file DwarfPrinter.h.
References MMI.
Referenced by llvm::DwarfWriter::EndFunction().
| const TargetAsmInfo* llvm::Dwarf::getTargetAsmInfo | ( | ) | const [inline] |
| const TargetData* llvm::Dwarf::getTargetData | ( | ) | const [inline] |
Definition at line 35 of file DwarfPrinter.cpp.
References llvm::TargetAsmInfo::getData32bitsDirective(), llvm::TargetAsmInfo::getData64bitsDirective(), llvm::TargetAsmInfo::getDwarfSectionOffsetDirective(), llvm::TargetData::getPointerSize(), O, TAI, and TD.
Referenced by EmitDifference(), EmitReference(), and EmitSectionOffset().
| void llvm::Dwarf::PrintLabelName | ( | const DWLabel & | Label | ) | const [inline] |
PrintLabelName - Print label name in form used by Dwarf writer.
Definition at line 100 of file DwarfPrinter.h.
Referenced by EmitDifference(), EmitLabel(), EmitReference(), and EmitSectionOffset().
| void Dwarf::PrintLabelName | ( | const char * | Tag, | |
| unsigned | Number | |||
| ) | const |
PrintLabelName - Print label name in form used by Dwarf writer.
Definition at line 46 of file DwarfPrinter.cpp.
References llvm::TargetAsmInfo::getPrivateGlobalPrefix(), O, and TAI.
| void Dwarf::PrintLabelName | ( | const char * | Tag, | |
| unsigned | Number, | |||
| const char * | Suffix | |||
| ) | const |
Definition at line 50 of file DwarfPrinter.cpp.
References llvm::TargetAsmInfo::getPrivateGlobalPrefix(), O, and TAI.
| void llvm::Dwarf::EmitLabel | ( | const DWLabel & | Label | ) | const [inline] |
EmitLabel - Emit location label for internal use by Dwarf.
Definition at line 109 of file DwarfPrinter.h.
Referenced by llvm::DwarfDebug::BeginFunction(), llvm::DwarfException::BeginFunction(), llvm::DwarfException::EndFunction(), llvm::DwarfDebug::EndFunction(), and llvm::DwarfDebug::EndModule().
| void Dwarf::EmitLabel | ( | const char * | Tag, | |
| unsigned | Number | |||
| ) | const |
EmitLabel - Emit location label for internal use by Dwarf.
Definition at line 59 of file DwarfPrinter.cpp.
References O, and PrintLabelName().
| void llvm::Dwarf::EmitReference | ( | const DWLabel & | Label, | |
| bool | IsPCRelative = false, |
|||
| bool | Force32Bit = false | |||
| ) | const [inline] |
EmitReference - Emit a reference to a label.
Definition at line 116 of file DwarfPrinter.h.
Referenced by llvm::DIEObjectLabel::EmitValue(), and llvm::DIEDwarfLabel::EmitValue().
| void Dwarf::EmitReference | ( | const char * | Tag, | |
| unsigned | Number, | |||
| bool | IsPCRelative = false, |
|||
| bool | Force32Bit = false | |||
| ) | const |
EmitReference - Emit a reference to a label.
Definition at line 66 of file DwarfPrinter.cpp.
References llvm::TargetAsmInfo::getPCSymbol(), O, PrintLabelName(), PrintRelDirective(), and TAI.
| void Dwarf::EmitReference | ( | const std::string & | Name, | |
| bool | IsPCRelative = false, |
|||
| bool | Force32Bit = false | |||
| ) | const |
Definition at line 72 of file DwarfPrinter.cpp.
References llvm::TargetAsmInfo::getPCSymbol(), O, PrintRelDirective(), and TAI.
| void llvm::Dwarf::EmitDifference | ( | const DWLabel & | LabelHi, | |
| const DWLabel & | LabelLo, | |||
| bool | IsSmall = false | |||
| ) | [inline] |
EmitDifference - Emit the difference between two labels. Some assemblers do not behave with absolute expressions with data directives, so there is an option (needsSet) to use an intermediary set expression.
Definition at line 130 of file DwarfPrinter.h.
Referenced by EmitFrameMoves(), and llvm::DIEDelta::EmitValue().
| void Dwarf::EmitDifference | ( | const char * | TagHi, | |
| unsigned | NumberHi, | |||
| const char * | TagLo, | |||
| unsigned | NumberLo, | |||
| bool | IsSmall = false | |||
| ) |
EmitDifference - Emit the difference between two labels. Some assemblers do not behave with absolute expressions with data directives, so there is an option (needsSet) to use an intermediary set expression.
Definition at line 82 of file DwarfPrinter.cpp.
References Flavor, llvm::TargetAsmInfo::needsSet(), O, PrintLabelName(), PrintRelDirective(), SetCounter, and TAI.
| void Dwarf::EmitSectionOffset | ( | const char * | Label, | |
| const char * | Section, | |||
| unsigned | LabelNumber, | |||
| unsigned | SectionNumber, | |||
| bool | IsSmall = false, |
|||
| bool | isEH = false, |
|||
| bool | useSet = true | |||
| ) |
Definition at line 105 of file DwarfPrinter.cpp.
References Flavor, llvm::TargetAsmInfo::isAbsoluteDebugSectionOffsets(), llvm::TargetAsmInfo::isAbsoluteEHSectionOffsets(), llvm::TargetAsmInfo::needsSet(), O, PrintLabelName(), PrintRelDirective(), SetCounter, and TAI.
Referenced by llvm::DIESectionOffset::EmitValue().
| void Dwarf::EmitFrameMoves | ( | const char * | BaseLabel, | |
| unsigned | BaseLabelID, | |||
| const std::vector< MachineMove > & | Moves, | |||
| bool | isEH | |||
| ) |
EmitFrameMoves - Emit frame instructions to describe the layout of the frame.
EmitFrameMoves - Emit frame instructions to describe the layout of the frame.
Definition at line 143 of file DwarfPrinter.cpp.
References Asm, llvm::dwarf::DW_CFA_advance_loc4, llvm::dwarf::DW_CFA_def_cfa, llvm::dwarf::DW_CFA_def_cfa_offset, llvm::dwarf::DW_CFA_def_cfa_register, llvm::dwarf::DW_CFA_offset, llvm::dwarf::DW_CFA_offset_extended, llvm::dwarf::DW_CFA_offset_extended_sf, EmitDifference(), llvm::AsmPrinter::EmitInt8(), llvm::AsmPrinter::EmitSLEB128Bytes(), llvm::AsmPrinter::EmitULEB128Bytes(), llvm::AsmPrinter::EOL(), llvm::MachineMove::getDestination(), llvm::TargetRegisterInfo::getDwarfRegNum(), llvm::TargetMachine::getFrameInfo(), llvm::MachineMove::getLabelID(), llvm::MachineLocation::getOffset(), llvm::TargetData::getPointerSize(), llvm::MachineLocation::getReg(), llvm::MachineMove::getSource(), llvm::TargetFrameInfo::getStackGrowthDirection(), llvm::MachineLocation::isReg(), llvm::AsmPrinter::isVerbose(), LabelID, llvm_unreachable, llvm::MachineModuleInfo::MappedLabel(), MMI, Offset, Reg, RI, Src, llvm::TargetFrameInfo::StackGrowsUp, TD, llvm::AsmPrinter::TM, llvm::utostr(), and llvm::MachineLocation::VirtualFP.
raw_ostream& llvm::Dwarf::O [protected] |
O - Stream to .s file.
Definition at line 40 of file DwarfPrinter.h.
Referenced by EmitDifference(), EmitLabel(), EmitReference(), EmitSectionOffset(), PrintLabelName(), and PrintRelDirective().
AsmPrinter* llvm::Dwarf::Asm [protected] |
Asm - Target of Dwarf emission.
Definition at line 44 of file DwarfPrinter.h.
Referenced by llvm::DwarfDebug::BeginFunction(), llvm::DwarfDebug::BeginModule(), EmitFrameMoves(), llvm::DwarfDebug::EndFunction(), and llvm::DwarfDebug::EndModule().
const TargetAsmInfo* llvm::Dwarf::TAI [protected] |
TAI - Target asm information.
Definition at line 48 of file DwarfPrinter.h.
Referenced by llvm::DwarfException::BeginFunction(), llvm::DwarfDebug::BeginModule(), EmitDifference(), EmitReference(), EmitSectionOffset(), llvm::DwarfException::EndModule(), PrintLabelName(), PrintRelDirective(), llvm::DwarfDebug::RecordInlinedFnEnd(), and llvm::DwarfDebug::RecordInlinedFnStart().
const TargetData* llvm::Dwarf::TD [protected] |
TD - Target data.
Definition at line 52 of file DwarfPrinter.h.
Referenced by EmitFrameMoves(), and PrintRelDirective().
const TargetRegisterInfo* llvm::Dwarf::RI [protected] |
RI - Register Information.
Definition at line 56 of file DwarfPrinter.h.
Referenced by EmitFrameMoves().
Module* llvm::Dwarf::M [protected] |
M - Current module.
Definition at line 60 of file DwarfPrinter.h.
Referenced by llvm::DwarfDebug::~DwarfDebug().
MachineFunction* llvm::Dwarf::MF [protected] |
MF - Current machine function.
Definition at line 64 of file DwarfPrinter.h.
Referenced by llvm::DwarfException::EndFunction().
MachineModuleInfo* llvm::Dwarf::MMI [protected] |
MMI - Collected machine module information.
Definition at line 68 of file DwarfPrinter.h.
Referenced by llvm::DwarfException::BeginFunction(), llvm::DwarfDebug::BeginFunction(), llvm::DwarfDebug::BeginModule(), EmitFrameMoves(), llvm::DwarfException::EndFunction(), llvm::DwarfDebug::EndFunction(), llvm::DwarfException::EndModule(), llvm::DwarfDebug::RecordInlinedFnEnd(), llvm::DwarfDebug::RecordInlinedFnStart(), llvm::DwarfDebug::RecordRegionEnd(), llvm::DwarfDebug::RecordRegionStart(), and llvm::DwarfDebug::RecordSourceLine().
unsigned llvm::Dwarf::SubprogramCount [protected] |
SubprogramCount - The running count of functions being compiled.
Definition at line 72 of file DwarfPrinter.h.
Referenced by llvm::DwarfDebug::BeginFunction(), and llvm::DwarfDebug::EndFunction().
const char* const llvm::Dwarf::Flavor [protected] |
Flavor - A unique string indicating what dwarf producer this is, used to unique labels.
Definition at line 77 of file DwarfPrinter.h.
Referenced by EmitDifference(), and EmitSectionOffset().
unsigned llvm::Dwarf::SetCounter [protected] |
SetCounter - A unique number for each '.set' directive.
Definition at line 81 of file DwarfPrinter.h.
Referenced by EmitDifference(), and EmitSectionOffset().