diff options
author | Alp Toker <alp@nuanti.com> | 2014-06-26 22:52:05 +0000 |
---|---|---|
committer | Alp Toker <alp@nuanti.com> | 2014-06-26 22:52:05 +0000 |
commit | 8dd8d5c2b2ad0f9dd1ca01c0a7d8ebac57b8537d (patch) | |
tree | 7da91c52380a71a92a895b0c172ae28b83fb6011 /lib/CodeGen/AsmPrinter | |
parent | eca517deaa890b1658ed0452704f398ce80e47b8 (diff) | |
download | llvm-8dd8d5c2b2ad0f9dd1ca01c0a7d8ebac57b8537d.tar.gz llvm-8dd8d5c2b2ad0f9dd1ca01c0a7d8ebac57b8537d.tar.bz2 llvm-8dd8d5c2b2ad0f9dd1ca01c0a7d8ebac57b8537d.tar.xz |
Revert "Introduce a string_ostream string builder facilty"
Temporarily back out commits r211749, r211752 and r211754.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211814 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/AsmPrinter')
-rw-r--r-- | lib/CodeGen/AsmPrinter/AsmPrinter.cpp | 3 | ||||
-rw-r--r-- | lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp | 12 |
2 files changed, 10 insertions, 5 deletions
diff --git a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/lib/CodeGen/AsmPrinter/AsmPrinter.cpp index ebb49c34a7..799ee92d3a 100644 --- a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp +++ b/lib/CodeGen/AsmPrinter/AsmPrinter.cpp @@ -1585,7 +1585,8 @@ static const MCExpr *lowerConstant(const Constant *CV, AsmPrinter &AP) { // Otherwise report the problem to the user. { - string_ostream OS; + std::string S; + raw_string_ostream OS(S); OS << "Unsupported expression in static initializer: "; CE->printAsOperand(OS, /*PrintType=*/false, !AP.MF ? nullptr : AP.MF->getFunction()->getParent()); diff --git a/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp b/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp index 01f26d0c4c..46ee0c856b 100644 --- a/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp +++ b/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp @@ -241,7 +241,8 @@ static void EmitMSInlineAsmStr(const char *AsmStr, const MachineInstr *MI, } } if (Error) { - string_ostream Msg; + std::string msg; + raw_string_ostream Msg(msg); Msg << "invalid operand in inline asm: '" << AsmStr << "'"; MMI->getModule()->getContext().emitError(LocCookie, Msg.str()); } @@ -412,7 +413,8 @@ static void EmitGCCInlineAsmStr(const char *AsmStr, const MachineInstr *MI, } } if (Error) { - string_ostream Msg; + std::string msg; + raw_string_ostream Msg(msg); Msg << "invalid operand in inline asm: '" << AsmStr << "'"; MMI->getModule()->getContext().emitError(LocCookie, Msg.str()); } @@ -469,7 +471,8 @@ void AsmPrinter::EmitInlineAsm(const MachineInstr *MI) const { // Emit the inline asm to a temporary string so we can emit it through // EmitInlineAsm. - small_string_ostream<256> OS; + SmallString<256> StringData; + raw_svector_ostream OS(StringData); // The variant of the current asmprinter. int AsmPrinterVariant = MAI->getAssemblerDialect(); @@ -514,7 +517,8 @@ void AsmPrinter::PrintSpecial(const MachineInstr *MI, raw_ostream &OS, } OS << Counter; } else { - string_ostream Msg; + std::string msg; + raw_string_ostream Msg(msg); Msg << "Unknown special formatter '" << Code << "' for machine instr: " << *MI; report_fatal_error(Msg.str()); |