[llvm-commits] [llvm] r97997 - in /llvm/trunk/lib/CodeGen/AsmPrinter: DwarfDebug.cpp DwarfPrinter.cpp DwarfPrinter.h
Chris Lattner
sabre at nondot.org
Mon Mar 8 14:47:57 PST 2010
Author: lattner
Date: Mon Mar 8 16:47:57 2010
New Revision: 97997
URL: http://llvm.org/viewvc/llvm-project?rev=97997&view=rev
Log:
eliminate the non-MCSymbol versions of EmitReference.
Modified:
llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
llvm/trunk/lib/CodeGen/AsmPrinter/DwarfPrinter.cpp
llvm/trunk/lib/CodeGen/AsmPrinter/DwarfPrinter.h
Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp?rev=97997&r1=97996&r2=97997&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp Mon Mar 8 16:47:57 2010
@@ -2487,7 +2487,8 @@
Asm->EmitInt8(0); EOL("Extended Op");
Asm->EmitInt8(TD->getPointerSize() + 1); EOL("Op size");
Asm->EmitInt8(dwarf::DW_LNE_set_address); EOL("DW_LNE_set_address");
- EmitReference("section_end", SectionEnd); EOL("Section end label");
+ EmitReference(getDWLabel("section_end", SectionEnd));
+ EOL("Section end label");
// Mark end of matrix.
Asm->EmitInt8(0); EOL("DW_LNE_end_sequence");
@@ -2608,7 +2609,7 @@
Asm->EmitInt8(0); EOL("Extended Op");
Asm->EmitInt8(TD->getPointerSize() + 1); EOL("Op size");
Asm->EmitInt8(dwarf::DW_LNE_set_address); EOL("DW_LNE_set_address");
- EmitReference("label", LabelID); EOL("Location label");
+ EmitReference(getDWLabel("label", LabelID)); EOL("Location label");
// If change of source, then switch to the new source.
if (Source != LineInfo.getSourceID()) {
@@ -2718,10 +2719,10 @@
getTempLabel("section_debug_frame"), true, false);
EOL("FDE CIE offset");
- EmitReference("func_begin", DebugFrameInfo.Number);
+ EmitReference(getDWLabel("func_begin", DebugFrameInfo.Number));
EOL("FDE initial location");
- EmitDifference("func_end", DebugFrameInfo.Number,
- "func_begin", DebugFrameInfo.Number);
+ EmitDifference(getDWLabel("func_end", DebugFrameInfo.Number),
+ getDWLabel("func_begin", DebugFrameInfo.Number));
EOL("FDE address range");
EmitFrameMoves("func_begin", DebugFrameInfo.Number, DebugFrameInfo.Moves,
@@ -2730,7 +2731,6 @@
Asm->EmitAlignment(2, 0, 0, false);
Asm->OutStreamer.EmitLabel(getDWLabel("debug_frame_end",
DebugFrameInfo.Number));
- Asm->O << '\n';
}
/// emitDebugPubNames - Emit visible names into a debug pubnames section.
Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfPrinter.cpp?rev=97997&r1=97996&r2=97997&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfPrinter.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfPrinter.cpp Mon Mar 8 16:47:57 2010
@@ -234,19 +234,6 @@
/// EmitReference - Emit a reference to a label.
///
-void DwarfPrinter::EmitReference(const char *Tag, unsigned Number,
- bool IsPCRelative, bool Force32Bit) const {
- PrintRelDirective(Force32Bit);
- PrintLabelName(Tag, Number);
- if (IsPCRelative) O << "-" << MAI->getPCSymbol();
-}
-void DwarfPrinter::EmitReference(const std::string &Name, bool IsPCRelative,
- bool Force32Bit) const {
- PrintRelDirective(Force32Bit);
- O << Name;
- if (IsPCRelative) O << "-" << MAI->getPCSymbol();
-}
-
void DwarfPrinter::EmitReference(const MCSymbol *Sym, bool IsPCRelative,
bool Force32Bit) const {
PrintRelDirective(Force32Bit);
Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfPrinter.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfPrinter.h?rev=97997&r1=97996&r2=97997&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfPrinter.h (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfPrinter.h Mon Mar 8 16:47:57 2010
@@ -133,12 +133,7 @@
///
void EmitReference(const MCSymbol *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 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;
More information about the llvm-commits
mailing list