aboutsummaryrefslogtreecommitdiffstats
path: root/lib/CodeGen/AsmPrinter
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-03-08 22:47:57 +0000
committerChris Lattner <sabre@nondot.org>2010-03-08 22:47:57 +0000
commitc7249da2e9d1b89f3b49a12dc698d6a683c32402 (patch)
treedcdbe8a08b4bbf7889302c9fa9fd32ef6a16ba31 /lib/CodeGen/AsmPrinter
parentf829eef8facab98ecb0fab5823511596b4ecb87b (diff)
downloadexternal_llvm-c7249da2e9d1b89f3b49a12dc698d6a683c32402.zip
external_llvm-c7249da2e9d1b89f3b49a12dc698d6a683c32402.tar.gz
external_llvm-c7249da2e9d1b89f3b49a12dc698d6a683c32402.tar.bz2
eliminate the non-MCSymbol versions of EmitReference.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97997 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/AsmPrinter')
-rw-r--r--lib/CodeGen/AsmPrinter/DwarfDebug.cpp12
-rw-r--r--lib/CodeGen/AsmPrinter/DwarfPrinter.cpp13
-rw-r--r--lib/CodeGen/AsmPrinter/DwarfPrinter.h7
3 files changed, 7 insertions, 25 deletions
diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
index 58ca15d..602145b 100644
--- a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
+++ b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
@@ -2487,7 +2487,8 @@ void DwarfDebug::emitEndOfLineMatrix(unsigned SectionEnd) {
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 @@ void DwarfDebug::emitDebugLines() {
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 @@ DwarfDebug::emitFunctionDebugFrame(const FunctionDebugFrameInfo&DebugFrameInfo){
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 @@ DwarfDebug::emitFunctionDebugFrame(const FunctionDebugFrameInfo&DebugFrameInfo){
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.
diff --git a/lib/CodeGen/AsmPrinter/DwarfPrinter.cpp b/lib/CodeGen/AsmPrinter/DwarfPrinter.cpp
index a28a1dc..36d8521 100644
--- a/lib/CodeGen/AsmPrinter/DwarfPrinter.cpp
+++ b/lib/CodeGen/AsmPrinter/DwarfPrinter.cpp
@@ -234,19 +234,6 @@ void DwarfPrinter::PrintLabelName(const char *Tag, unsigned Number,
/// 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);
diff --git a/lib/CodeGen/AsmPrinter/DwarfPrinter.h b/lib/CodeGen/AsmPrinter/DwarfPrinter.h
index ac400e9..316cd01 100644
--- a/lib/CodeGen/AsmPrinter/DwarfPrinter.h
+++ b/lib/CodeGen/AsmPrinter/DwarfPrinter.h
@@ -133,12 +133,7 @@ public:
///
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;