mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +00:00
Separate target specific asm properties from the asm printers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30126 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -48,6 +48,7 @@ class Module;
|
||||
class MRegisterInfo;
|
||||
class SubprogramDesc;
|
||||
class SourceLineInfo;
|
||||
class TargetAsmInfo;
|
||||
class TargetData;
|
||||
class Type;
|
||||
class TypeDesc;
|
||||
@@ -70,7 +71,8 @@ public:
|
||||
// DwarfWriter - Emits Dwarf debug and exception handling directives.
|
||||
//
|
||||
class DwarfWriter {
|
||||
protected:
|
||||
|
||||
private:
|
||||
|
||||
//===--------------------------------------------------------------------===//
|
||||
// Core attributes used by the Dwarf writer.
|
||||
@@ -85,6 +87,9 @@ protected:
|
||||
///
|
||||
AsmPrinter *Asm;
|
||||
|
||||
/// TAI - Target Asm Printer.
|
||||
TargetAsmInfo *TAI;
|
||||
|
||||
/// TD - Target data.
|
||||
const TargetData *TD;
|
||||
|
||||
@@ -147,93 +152,14 @@ protected:
|
||||
/// SectionSourceLines - Tracks line numbers per text section.
|
||||
///
|
||||
std::vector<std::vector<SourceLineInfo *> > SectionSourceLines;
|
||||
|
||||
//===--------------------------------------------------------------------===//
|
||||
// Properties to be set by the derived class ctor, used to configure the
|
||||
// Dwarf writer.
|
||||
//
|
||||
|
||||
/// AddressSize - Size of addresses used in file.
|
||||
///
|
||||
unsigned AddressSize;
|
||||
|
||||
/// hasLEB128 - True if target asm supports leb128 directives.
|
||||
///
|
||||
bool hasLEB128; /// Defaults to false.
|
||||
|
||||
/// hasDotLoc - True if target asm supports .loc directives.
|
||||
///
|
||||
bool hasDotLoc; /// Defaults to false.
|
||||
|
||||
/// hasDotFile - True if target asm supports .file directives.
|
||||
///
|
||||
bool hasDotFile; /// Defaults to false.
|
||||
|
||||
/// needsSet - True if target asm can't compute addresses on data
|
||||
/// directives.
|
||||
bool needsSet; /// Defaults to false.
|
||||
|
||||
/// DwarfAbbrevSection - Section directive for Dwarf abbrev.
|
||||
///
|
||||
const char *DwarfAbbrevSection; /// Defaults to ".debug_abbrev".
|
||||
|
||||
/// DwarfInfoSection - Section directive for Dwarf info.
|
||||
///
|
||||
const char *DwarfInfoSection; /// Defaults to ".debug_info".
|
||||
|
||||
/// DwarfLineSection - Section directive for Dwarf info.
|
||||
///
|
||||
const char *DwarfLineSection; /// Defaults to ".debug_line".
|
||||
|
||||
/// DwarfFrameSection - Section directive for Dwarf info.
|
||||
///
|
||||
const char *DwarfFrameSection; /// Defaults to ".debug_frame".
|
||||
|
||||
/// DwarfPubNamesSection - Section directive for Dwarf info.
|
||||
///
|
||||
const char *DwarfPubNamesSection; /// Defaults to ".debug_pubnames".
|
||||
|
||||
/// DwarfPubTypesSection - Section directive for Dwarf info.
|
||||
///
|
||||
const char *DwarfPubTypesSection; /// Defaults to ".debug_pubtypes".
|
||||
|
||||
/// DwarfStrSection - Section directive for Dwarf info.
|
||||
///
|
||||
const char *DwarfStrSection; /// Defaults to ".debug_str".
|
||||
|
||||
/// DwarfLocSection - Section directive for Dwarf info.
|
||||
///
|
||||
const char *DwarfLocSection; /// Defaults to ".debug_loc".
|
||||
|
||||
/// DwarfARangesSection - Section directive for Dwarf info.
|
||||
///
|
||||
const char *DwarfARangesSection; /// Defaults to ".debug_aranges".
|
||||
|
||||
/// DwarfRangesSection - Section directive for Dwarf info.
|
||||
///
|
||||
const char *DwarfRangesSection; /// Defaults to ".debug_ranges".
|
||||
|
||||
/// DwarfMacInfoSection - Section directive for Dwarf info.
|
||||
///
|
||||
const char *DwarfMacInfoSection; /// Defaults to ".debug_macinfo".
|
||||
|
||||
/// TextSection - Section directive for standard text.
|
||||
///
|
||||
const char *TextSection; /// Defaults to ".text".
|
||||
|
||||
/// DataSection - Section directive for standard data.
|
||||
///
|
||||
const char *DataSection; /// Defaults to ".data".
|
||||
public:
|
||||
|
||||
//===--------------------------------------------------------------------===//
|
||||
// Emission and print routines
|
||||
//
|
||||
|
||||
public:
|
||||
/// getAddressSize - Return the size of a target address in bytes.
|
||||
///
|
||||
unsigned getAddressSize() const { return AddressSize; }
|
||||
|
||||
/// PrintHex - Print a value as a hexidecimal value.
|
||||
///
|
||||
void PrintHex(int Value) const;
|
||||
@@ -461,9 +387,13 @@ private:
|
||||
|
||||
public:
|
||||
|
||||
DwarfWriter(std::ostream &OS, AsmPrinter *A);
|
||||
DwarfWriter(std::ostream &OS, AsmPrinter *A, TargetAsmInfo *T);
|
||||
virtual ~DwarfWriter();
|
||||
|
||||
// Accessors.
|
||||
//
|
||||
TargetAsmInfo *getTargetAsmInfo() const { return TAI; }
|
||||
|
||||
/// SetDebugInfo - Set DebugInfo when it's known that pass manager has
|
||||
/// created it. Set by the target AsmPrinter.
|
||||
void SetDebugInfo(MachineDebugInfo *DI);
|
||||
|
Reference in New Issue
Block a user