1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 11:42:57 +01:00

mc'ize the last use of PrintLabelName and eliminate PrintLabelName.

llvm-svn: 98015
This commit is contained in:
Chris Lattner 2010-03-09 00:26:09 +00:00
parent 644850459d
commit a583d01e79
3 changed files with 7 additions and 20 deletions

View File

@ -15,6 +15,7 @@
#include "llvm/Module.h" #include "llvm/Module.h"
#include "llvm/CodeGen/MachineFunction.h" #include "llvm/CodeGen/MachineFunction.h"
#include "llvm/CodeGen/MachineModuleInfo.h" #include "llvm/CodeGen/MachineModuleInfo.h"
#include "llvm/MC/MCExpr.h"
#include "llvm/MC/MCSection.h" #include "llvm/MC/MCSection.h"
#include "llvm/MC/MCStreamer.h" #include "llvm/MC/MCStreamer.h"
#include "llvm/MC/MCAsmInfo.h" #include "llvm/MC/MCAsmInfo.h"
@ -2967,12 +2968,11 @@ void DwarfDebug::emitDebugInlineInfo() {
DIE *SP = LI->second; DIE *SP = LI->second;
Asm->EmitInt32(SP->getOffset()); EOL("DIE offset"); Asm->EmitInt32(SP->getOffset()); EOL("DIE offset");
if (TD->getPointerSize() == sizeof(int32_t)) // FIXME: "Labels" should hold MCSymbol*'s
O << MAI->getData32bitsDirective(); MCSymbol *L = getDWLabel("label", LI->first);
else if (Asm->VerboseAsm) Asm->OutStreamer.AddComment("low_pc");
O << MAI->getData64bitsDirective(); Asm->OutStreamer.EmitValue(MCSymbolRefExpr::Create(L, Asm->OutContext),
TD->getPointerSize(), 0/*AddrSpace*/);
PrintLabelName(getDWLabel("label", LI->first)); EOL("low_pc");
} }
} }

View File

@ -209,13 +209,6 @@ void DwarfPrinter::EmitULEB128(unsigned Value, const char *Desc,
} }
/// PrintLabelName - Print label name in form used by Dwarf writer.
///
void DwarfPrinter::PrintLabelName(const MCSymbol *Label) const {
// FIXME: REMOVE.
O << Label->getName();
}
/// EmitReference - Emit a reference to a label. /// EmitReference - Emit a reference to a label.
/// ///
void DwarfPrinter::EmitReference(const MCSymbol *Sym, bool IsPCRelative, void DwarfPrinter::EmitReference(const MCSymbol *Sym, bool IsPCRelative,
@ -229,7 +222,7 @@ void DwarfPrinter::EmitReference(const MCSymbol *Sym, unsigned Encoding) const {
const TargetLoweringObjectFile &TLOF = Asm->getObjFileLowering(); const TargetLoweringObjectFile &TLOF = Asm->getObjFileLowering();
PrintRelDirective(Encoding); PrintRelDirective(Encoding);
O << *TLOF.getSymbolForDwarfReference(Sym, Asm->MMI, Encoding);; O << *TLOF.getSymbolForDwarfReference(Sym, Asm->MMI, Encoding);
} }
void DwarfPrinter::EmitReference(const GlobalValue *GV, unsigned Encoding)const{ void DwarfPrinter::EmitReference(const GlobalValue *GV, unsigned Encoding)const{
@ -300,8 +293,6 @@ void DwarfPrinter::EmitFrameMoves(const char *BaseLabel, unsigned BaseLabelID,
EmitCFAByte(dwarf::DW_CFA_advance_loc4); EmitCFAByte(dwarf::DW_CFA_advance_loc4);
EmitDifference(getDWLabel("label", LabelID), EmitDifference(getDWLabel("label", LabelID),
getDWLabel(BaseLabel, BaseLabelID), true); getDWLabel(BaseLabel, BaseLabelID), true);
Asm->O << '\n';
BaseLabelID = LabelID; BaseLabelID = LabelID;
BaseLabel = "label"; BaseLabel = "label";
IsLocal = true; IsLocal = true;

View File

@ -113,10 +113,6 @@ public:
unsigned PadTo = 0) const; unsigned PadTo = 0) const;
/// PrintLabelName - Print label name in form used by Dwarf writer.
///
void PrintLabelName(const MCSymbol *Label) const;
/// EmitReference - Emit a reference to a label. /// EmitReference - Emit a reference to a label.
/// ///
void EmitReference(const MCSymbol *Label, bool IsPCRelative = false, void EmitReference(const MCSymbol *Label, bool IsPCRelative = false,