[llvm-commits] [llvm] r98116 - in /llvm/trunk/lib/CodeGen/AsmPrinter: DwarfDebug.cpp DwarfException.cpp DwarfPrinter.cpp
Chris Lattner
sabre at nondot.org
Tue Mar 9 17:04:13 PST 2010
Author: lattner
Date: Tue Mar 9 19:04:13 2010
New Revision: 98116
URL: http://llvm.org/viewvc/llvm-project?rev=98116&view=rev
Log:
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.
Modified:
llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
llvm/trunk/lib/CodeGen/AsmPrinter/DwarfException.cpp
llvm/trunk/lib/CodeGen/AsmPrinter/DwarfPrinter.cpp
Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp?rev=98116&r1=98115&r2=98116&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp Tue Mar 9 19:04:13 2010
@@ -2598,12 +2598,6 @@
// Isolate current sections line info.
const std::vector<SrcLineInfo> &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 @@
if (LineInfo.getLine() == 0) continue;
if (Asm->isVerbose()) {
- std::pair<unsigned, unsigned> SourceID =
+ std::pair<unsigned, unsigned> 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.
Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfException.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfException.cpp?rev=98116&r1=98115&r2=98116&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfException.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfException.cpp Tue Mar 9 19:04:13 2010
@@ -280,7 +280,7 @@
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.
Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfPrinter.cpp?rev=98116&r1=98115&r2=98116&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfPrinter.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfPrinter.cpp Tue Mar 9 19:04:13 2010
@@ -138,6 +138,7 @@
Asm->OutStreamer.AddComment(Desc);
if (MAI->hasLEB128()) {
+ // FIXME: MCize.
O << "\t.sleb128\t" << Value;
Asm->OutStreamer.AddBlankLine();
return;
@@ -163,6 +164,7 @@
Asm->OutStreamer.AddComment(Desc);
if (MAI->hasLEB128() && PadTo == 0) {
+ // FIXME: MCize.
O << "\t.uleb128\t" << Value;
Asm->OutStreamer.AddBlankLine();
return;
@@ -196,6 +198,7 @@
}
// FIXME: Need an MCExpr for ".".
+ // FIXME: MCize.
if (Force32Bit || TD->getPointerSize() == sizeof(int32_t))
O << MAI->getData32bitsDirective();
else
@@ -241,7 +244,8 @@
// 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*/);
More information about the llvm-commits
mailing list