move sleb printing out of asmprinter into dwarf printer, make clients
handle the comment better, MCize the non-.sleb case.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94244 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
index 87afee0..bf3d424 100644
--- a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
+++ b/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
@@ -672,22 +672,6 @@
   } while (Value);
 }
 
-/// PrintSLEB128 - Print a series of hexadecimal values (separated by commas)
-/// representing a signed leb128 value.
-void AsmPrinter::PrintSLEB128(int Value) const {
-  int Sign = Value >> (8 * sizeof(Value) - 1);
-  bool IsMore;
-
-  do {
-    unsigned char Byte = static_cast<unsigned char>(Value & 0x7f);
-    Value >>= 7;
-    IsMore = Value != Sign || ((Byte ^ Sign) & 0x40) != 0;
-    if (IsMore) Byte |= 0x80;
-    O << "0x";
-    O.write_hex(Byte);
-    if (IsMore) O << ", ";
-  } while (IsMore);
-}
 
 //===--------------------------------------------------------------------===//
 // Emission and print routines
@@ -707,26 +691,13 @@
 /// unsigned leb128 value.
 void AsmPrinter::EmitULEB128Bytes(unsigned Value) const {
   if (MAI->hasLEB128()) {
-    O << "\t.uleb128\t"
-      << Value;
+    O << "\t.uleb128\t" << Value;
   } else {
     O << MAI->getData8bitsDirective();
     PrintULEB128(Value);
   }
 }
 
-/// EmitSLEB128Bytes - print an assembler byte data directive to compose a
-/// signed leb128 value.
-void AsmPrinter::EmitSLEB128Bytes(int Value) const {
-  if (MAI->hasLEB128()) {
-    O << "\t.sleb128\t"
-      << Value;
-  } else {
-    O << MAI->getData8bitsDirective();
-    PrintSLEB128(Value);
-  }
-}
-
 /// EmitInt8 - Emit a byte directive and value.
 ///
 void AsmPrinter::EmitInt8(int Value) const {