Add 118023 back, but with proper spelling for .uleb128/.sleb128.
authorRafael Espindola <rafael.espindola@gmail.com>
Thu, 4 Nov 2010 18:17:08 +0000 (18:17 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Thu, 4 Nov 2010 18:17:08 +0000 (18:17 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118254 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp
lib/MC/MCAsmStreamer.cpp

index ce4519c541e3bb301f89af7b389e3dae3de55471..f737e90b15517402d588b7d13d50fffd32cae9dd 100644 (file)
@@ -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;
   }
   
index 9bb25eef95b226cecd439696ae5aaf05c39a7505..54f0163dec50a69e226c34324690c84a3fc0f5db 100644 (file)
@@ -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();
 }