diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2010-11-04 17:04:24 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2010-11-04 17:04:24 +0000 |
commit | 537ebeaffcce2b44705f678a67802ea77c5a3f92 (patch) | |
tree | 9ff71fdf207bbbeb36a2d18431121baf17852a85 | |
parent | 40f6514ff08e880504f920887e0cc54bef23ef97 (diff) | |
download | external_llvm-537ebeaffcce2b44705f678a67802ea77c5a3f92.zip external_llvm-537ebeaffcce2b44705f678a67802ea77c5a3f92.tar.gz external_llvm-537ebeaffcce2b44705f678a67802ea77c5a3f92.tar.bz2 |
Revert previous patch. Some targets don't support uleb and say
they do :-(
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118250 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp b/lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp index f737e90..ce4519c 100644 --- a/lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp +++ b/lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp @@ -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; } |