Revert previous patch. Some targets don't support uleb and say
[oota-llvm.git] / lib / CodeGen / AsmPrinter / AsmPrinterDwarf.cpp
index f737e90b15517402d588b7d13d50fffd32cae9dd..ce4519c541e3bb301f89af7b389e3dae3de55471 100644 (file)
@@ -36,8 +36,9 @@ void AsmPrinter::EmitSLEB128(int Value, const char *Desc) const {
   if (isVerbose() && Desc)
     OutStreamer.AddComment(Desc);
     
-  if (MAI->hasLEB128()) {
-    OutStreamer.EmitSLEB128IntValue(Value);
+  if (MAI->hasLEB128() && OutStreamer.hasRawTextSupport()) {
+    // FIXME: MCize.
+    OutStreamer.EmitRawText("\t.sleb128\t" + Twine(Value));
     return;
   }
 
@@ -59,10 +60,10 @@ void AsmPrinter::EmitULEB128(unsigned Value, const char *Desc,
                              unsigned PadTo) const {
   if (isVerbose() && Desc)
     OutStreamer.AddComment(Desc);
-
-  // FIXME: Should we add a PadTo option to the streamer?
-  if (MAI->hasLEB128() && PadTo == 0) {
-    OutStreamer.EmitULEB128IntValue(Value); 
+  if (MAI->hasLEB128() && PadTo == 0 && OutStreamer.hasRawTextSupport()) {
+    // FIXME: MCize.
+    OutStreamer.EmitRawText("\t.uleb128\t" + Twine(Value));
     return;
   }