diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2010-11-04 18:17:08 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2010-11-04 18:17:08 +0000 |
commit | 738734501635a15d8ed2d1c8d52962ed5f319bd3 (patch) | |
tree | 1e48aa1fdbc40f2aaf82449ca7c9e55e610561d7 | |
parent | 537ebeaffcce2b44705f678a67802ea77c5a3f92 (diff) | |
download | external_llvm-738734501635a15d8ed2d1c8d52962ed5f319bd3.zip external_llvm-738734501635a15d8ed2d1c8d52962ed5f319bd3.tar.gz external_llvm-738734501635a15d8ed2d1c8d52962ed5f319bd3.tar.bz2 |
Add 118023 back, but with proper spelling for .uleb128/.sleb128.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118254 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp | 13 | ||||
-rw-r--r-- | lib/MC/MCAsmStreamer.cpp | 6 |
2 files changed, 10 insertions, 9 deletions
diff --git a/lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp b/lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp index ce4519c..f737e90 100644 --- a/lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp +++ b/lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp @@ -36,9 +36,8 @@ void AsmPrinter::EmitSLEB128(int Value, const char *Desc) const { if (isVerbose() && Desc) OutStreamer.AddComment(Desc); - if (MAI->hasLEB128() && OutStreamer.hasRawTextSupport()) { - // FIXME: MCize. - OutStreamer.EmitRawText("\t.sleb128\t" + Twine(Value)); + if (MAI->hasLEB128()) { + OutStreamer.EmitSLEB128IntValue(Value); return; } @@ -60,10 +59,10 @@ void AsmPrinter::EmitULEB128(unsigned Value, const char *Desc, unsigned PadTo) const { if (isVerbose() && Desc) OutStreamer.AddComment(Desc); - - if (MAI->hasLEB128() && PadTo == 0 && OutStreamer.hasRawTextSupport()) { - // FIXME: MCize. - OutStreamer.EmitRawText("\t.uleb128\t" + Twine(Value)); + + // FIXME: Should we add a PadTo option to the streamer? + if (MAI->hasLEB128() && PadTo == 0) { + OutStreamer.EmitULEB128IntValue(Value); return; } diff --git a/lib/MC/MCAsmStreamer.cpp b/lib/MC/MCAsmStreamer.cpp index 9bb25ee..54f0163 100644 --- a/lib/MC/MCAsmStreamer.cpp +++ b/lib/MC/MCAsmStreamer.cpp @@ -512,12 +512,14 @@ void MCAsmStreamer::EmitValue(const MCExpr *Value, unsigned Size, } void MCAsmStreamer::EmitULEB128Value(const MCExpr *Value, unsigned AddrSpace) { - OS << ".uleb " << *Value; + assert(MAI.hasLEB128() && "Cannot print a .uleb"); + OS << ".uleb128 " << *Value; EmitEOL(); } void MCAsmStreamer::EmitSLEB128Value(const MCExpr *Value, unsigned AddrSpace) { - OS << ".sleb " << *Value; + assert(MAI.hasLEB128() && "Cannot print a .sleb"); + OS << ".sleb128 " << *Value; EmitEOL(); } |