From ee3b40f64dfa5ea52a407897e966829468e1d11b Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Wed, 10 Mar 2010 01:04:13 +0000 Subject: add some fixme's for MCizing. EH still has a few things that need to be MCized, but the last debug info thing are LEB and cygwin specific (which the MC api doesn't support yet) and one specific form of EmitReference which I'll tackle next. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98116 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/AsmPrinter/DwarfDebug.cpp | 14 +++----------- lib/CodeGen/AsmPrinter/DwarfException.cpp | 2 +- lib/CodeGen/AsmPrinter/DwarfPrinter.cpp | 6 +++++- 3 files changed, 9 insertions(+), 13 deletions(-) (limited to 'lib/CodeGen') diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp index d759f1e..20cd623 100644 --- a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp +++ b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp @@ -2598,12 +2598,6 @@ void DwarfDebug::emitDebugLines() { // Isolate current sections line info. const std::vector &LineInfos = SectionSourceLines[j]; - /*if (Asm->isVerbose()) { - const MCSection *S = SectionMap[j + 1]; - O << '\t' << MAI->getCommentString() << " Section" - << S->getName() << '\n'; - }*/ - // Dwarf assumes we start with first line of first source file. unsigned Source = 1; unsigned Line = 1; @@ -2617,12 +2611,10 @@ void DwarfDebug::emitDebugLines() { if (LineInfo.getLine() == 0) continue; if (Asm->isVerbose()) { - std::pair SourceID = + std::pair SrcID = getSourceDirectoryAndFileIds(LineInfo.getSourceID()); - O << '\t' << MAI->getCommentString() << ' ' - << getSourceDirectoryName(SourceID.first) << '/' - << getSourceFileName(SourceID.second) - << ':' << utostr_32(LineInfo.getLine()) << '\n'; + Asm->OutStreamer.AddComment(Twine(getSourceDirectoryName(SrcID.first)) + + ":" + Twine(LineInfo.getLine())); } // Define the line address. diff --git a/lib/CodeGen/AsmPrinter/DwarfException.cpp b/lib/CodeGen/AsmPrinter/DwarfException.cpp index 4f44534..b85ae3b 100644 --- a/lib/CodeGen/AsmPrinter/DwarfException.cpp +++ b/lib/CodeGen/AsmPrinter/DwarfException.cpp @@ -280,7 +280,7 @@ void DwarfException::EmitFDE(const FunctionEHFrameInfo &EHFrameInfo) { Asm->OutStreamer.EmitSymbolAttribute(EHFrameInfo.FunctionEHSym, MCSA_NoDeadStrip); } - Asm->O << '\n'; + Asm->OutStreamer.AddBlankLine(); } /// SharedTypeIds - How many leading type ids two landing pads have in common. diff --git a/lib/CodeGen/AsmPrinter/DwarfPrinter.cpp b/lib/CodeGen/AsmPrinter/DwarfPrinter.cpp index d69b530..878a5e7 100644 --- a/lib/CodeGen/AsmPrinter/DwarfPrinter.cpp +++ b/lib/CodeGen/AsmPrinter/DwarfPrinter.cpp @@ -138,6 +138,7 @@ void DwarfPrinter::EmitSLEB128(int Value, const char *Desc) const { Asm->OutStreamer.AddComment(Desc); if (MAI->hasLEB128()) { + // FIXME: MCize. O << "\t.sleb128\t" << Value; Asm->OutStreamer.AddBlankLine(); return; @@ -163,6 +164,7 @@ void DwarfPrinter::EmitULEB128(unsigned Value, const char *Desc, Asm->OutStreamer.AddComment(Desc); if (MAI->hasLEB128() && PadTo == 0) { + // FIXME: MCize. O << "\t.uleb128\t" << Value; Asm->OutStreamer.AddBlankLine(); return; @@ -196,6 +198,7 @@ void DwarfPrinter::EmitReference(const MCSymbol *Sym, bool IsPCRelative, } // FIXME: Need an MCExpr for ".". + // FIXME: MCize. if (Force32Bit || TD->getPointerSize() == sizeof(int32_t)) O << MAI->getData32bitsDirective(); else @@ -241,7 +244,8 @@ void DwarfPrinter::EmitSectionOffset(const MCSymbol *Label, // On COFF targets, we have to emit the weird .secrel32 directive. if (const char *SecOffDir = MAI->getDwarfSectionOffsetDirective()) - O << SecOffDir << Label->getName(); + // FIXME: MCize. + Asm->O << SecOffDir << Label->getName(); else { unsigned Size = IsSmall ? 4 : TD->getPointerSize(); Asm->OutStreamer.EmitSymbolValue(Label, Size, 0/*AddrSpace*/); -- cgit v1.1