diff options
Diffstat (limited to 'lib/CodeGen/AsmPrinter/DwarfPrinter.h')
-rw-r--r-- | lib/CodeGen/AsmPrinter/DwarfPrinter.h | 76 |
1 files changed, 15 insertions, 61 deletions
diff --git a/lib/CodeGen/AsmPrinter/DwarfPrinter.h b/lib/CodeGen/AsmPrinter/DwarfPrinter.h index bd715f2..5e2d806 100644 --- a/lib/CodeGen/AsmPrinter/DwarfPrinter.h +++ b/lib/CodeGen/AsmPrinter/DwarfPrinter.h @@ -14,7 +14,6 @@ #ifndef CODEGEN_ASMPRINTER_DWARFPRINTER_H__ #define CODEGEN_ASMPRINTER_DWARFPRINTER_H__ -#include "DwarfLabel.h" #include "llvm/CodeGen/MachineLocation.h" #include "llvm/Support/Compiler.h" #include "llvm/Support/FormattedStream.h" @@ -67,15 +66,7 @@ protected: /// SubprogramCount - The running count of functions being compiled. unsigned SubprogramCount; - /// Flavor - A unique string indicating what dwarf producer this is, used to - /// unique labels. - const char * const Flavor; - - /// SetCounter - A unique number for each '.set' directive. - unsigned SetCounter; - - DwarfPrinter(raw_ostream &OS, AsmPrinter *A, const MCAsmInfo *T, - const char *flavor); + DwarfPrinter(raw_ostream &OS, AsmPrinter *A, const MCAsmInfo *T); public: //===------------------------------------------------------------------===// @@ -86,17 +77,17 @@ public: const MCAsmInfo *getMCAsmInfo() const { return MAI; } const TargetData *getTargetData() const { return TD; } + /// getDWLabel - Return the MCSymbol corresponding to the assembler temporary + /// label with the specified stem and unique ID. + MCSymbol *getDWLabel(const char *Name, unsigned ID) const; + + /// getTempLabel - Return an assembler temporary label with the specified + /// name. + MCSymbol *getTempLabel(const char *Name) const; + /// SizeOfEncodedValue - Return the size of the encoding in bytes. unsigned SizeOfEncodedValue(unsigned Encoding) const; - void PrintRelDirective(unsigned Encoding) const; - void PrintRelDirective(bool Force32Bit = false, - bool isInSection = false) const; - - /// EOL - Print a newline character to asm stream. If a comment is present - /// then it will be printed first. Comments should not contain '\n'. - void EOL(const Twine &Comment) const; - /// EmitEncodingByte - Emit a .byte 42 directive that corresponds to an /// encoding. If verbose assembly output is enabled, we output comments /// describing the encoding. Desc is a string saying what the encoding is @@ -115,57 +106,20 @@ public: unsigned PadTo = 0) const; - /// PrintLabelName - Print label name in form used by Dwarf writer. - /// - void PrintLabelName(const DWLabel &Label) const { - PrintLabelName(Label.getTag(), Label.getNumber()); - } - void PrintLabelName(const char *Tag, unsigned Number) const; - void PrintLabelName(const char *Tag, unsigned Number, - const char *Suffix) const; - - /// EmitLabel - Emit location label for internal use by Dwarf. - /// - void EmitLabel(const DWLabel &Label) const { - EmitLabel(Label.getTag(), Label.getNumber()); - } - void EmitLabel(const char *Tag, unsigned Number) const; - /// EmitReference - Emit a reference to a label. /// - void EmitReference(const DWLabel &Label, bool IsPCRelative = false, - bool Force32Bit = false) const { - EmitReference(Label.getTag(), Label.getNumber(), - IsPCRelative, Force32Bit); - } - 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 EmitReference(const MCSymbol *Sym, bool IsPCRelative = false, - bool Force32Bit = false) const; - - void EmitReference(const char *Tag, unsigned Number, unsigned Encoding) const; void EmitReference(const MCSymbol *Sym, unsigned Encoding) const; void EmitReference(const GlobalValue *GV, unsigned Encoding) const; /// EmitDifference - Emit the difference between two labels. - void EmitDifference(const DWLabel &LabelHi, const DWLabel &LabelLo, - bool IsSmall = false) { - EmitDifference(LabelHi.getTag(), LabelHi.getNumber(), - LabelLo.getTag(), LabelLo.getNumber(), - IsSmall); - } - void EmitDifference(const char *TagHi, unsigned NumberHi, - const char *TagLo, unsigned NumberLo, + void EmitDifference(const MCSymbol *LabelHi, const MCSymbol *LabelLo, bool IsSmall = false); - void EmitSectionOffset(const char* Label, const char* Section, - unsigned LabelNumber, unsigned SectionNumber, - bool IsSmall = false, bool isEH = false, - bool useSet = true); - + /// EmitSectionOffset - Emit Label-Section or use a special purpose directive + /// to emit a section offset if the target has one. + void EmitSectionOffset(const MCSymbol *Label, const MCSymbol *Section, + bool IsSmall = false, bool isEH = false); + /// EmitFrameMoves - Emit frame instructions to describe the layout of the /// frame. void EmitFrameMoves(const char *BaseLabel, unsigned BaseLabelID, |