diff options
-rw-r--r-- | llvm/tools/llvm-debuginfo-analyzer/llvm-debuginfo-analyzer.cpp | 2 | ||||
-rw-r--r-- | llvm/tools/llvm-libtool-darwin/llvm-libtool-darwin.cpp | 2 | ||||
-rw-r--r-- | llvm/tools/llvm-lipo/llvm-lipo.cpp | 4 | ||||
-rw-r--r-- | llvm/tools/llvm-readobj/ARMWinEHPrinter.cpp | 14 | ||||
-rw-r--r-- | llvm/tools/llvm-xray/xray-graph.cpp | 2 |
5 files changed, 12 insertions, 12 deletions
diff --git a/llvm/tools/llvm-debuginfo-analyzer/llvm-debuginfo-analyzer.cpp b/llvm/tools/llvm-debuginfo-analyzer/llvm-debuginfo-analyzer.cpp index fb82ec0..0ce8e1e 100644 --- a/llvm/tools/llvm-debuginfo-analyzer/llvm-debuginfo-analyzer.cpp +++ b/llvm/tools/llvm-debuginfo-analyzer/llvm-debuginfo-analyzer.cpp @@ -34,7 +34,7 @@ static void error(std::error_code EC, char const *Fmt, const Ts &...Vals) { std::string Buffer; raw_string_ostream Stream(Buffer); Stream << format(Fmt, Vals...); - WithColor::error(errs(), ToolName) << Stream.str() << "\n"; + WithColor::error(errs(), ToolName) << Buffer << "\n"; exit(1); } diff --git a/llvm/tools/llvm-libtool-darwin/llvm-libtool-darwin.cpp b/llvm/tools/llvm-libtool-darwin/llvm-libtool-darwin.cpp index 77ae9b4..3d3f3f0 100644 --- a/llvm/tools/llvm-libtool-darwin/llvm-libtool-darwin.cpp +++ b/llvm/tools/llvm-libtool-darwin/llvm-libtool-darwin.cpp @@ -183,7 +183,7 @@ static Error validateArchitectureName(StringRef ArchitectureName) { return createStringError( std::errc::invalid_argument, "invalid architecture '%s': valid architecture names are %s", - ArchitectureName.str().c_str(), OS.str().c_str()); + ArchitectureName.str().c_str(), Buf.c_str()); } return Error::success(); } diff --git a/llvm/tools/llvm-lipo/llvm-lipo.cpp b/llvm/tools/llvm-lipo/llvm-lipo.cpp index 083a922..711a918 100644 --- a/llvm/tools/llvm-lipo/llvm-lipo.cpp +++ b/llvm/tools/llvm-lipo/llvm-lipo.cpp @@ -142,7 +142,7 @@ static void validateArchitectureName(StringRef ArchitectureName) { << "\nValid architecture names are:"; for (auto arch : MachOObjectFile::getValidArchs()) OS << " " << arch; - reportError(OS.str()); + reportError(Buf); } } @@ -241,7 +241,7 @@ static Config parseLipoOptions(ArrayRef<const char *> ArgsArr) { OS << "only one of the following actions can be specified:"; for (auto *Arg : ActionArgs) OS << " " << Arg->getSpelling(); - reportError(OS.str()); + reportError(Buf); } switch (ActionArgs[0]->getOption().getID()) { diff --git a/llvm/tools/llvm-readobj/ARMWinEHPrinter.cpp b/llvm/tools/llvm-readobj/ARMWinEHPrinter.cpp index b77839c..08baa03 100644 --- a/llvm/tools/llvm-readobj/ARMWinEHPrinter.cpp +++ b/llvm/tools/llvm-readobj/ARMWinEHPrinter.cpp @@ -106,7 +106,7 @@ static std::string formatSymbol(StringRef Name, uint64_t Address, else OS << format("0x%" PRIX64, Address); - return OS.str(); + return Buffer; } namespace llvm { @@ -305,7 +305,7 @@ ErrorOr<SymbolRef> Decoder::getSymbolForLocation( std::string Buf; llvm::raw_string_ostream OS(Buf); logAllUnhandledErrors(AddressOrErr.takeError(), OS); - report_fatal_error(Twine(OS.str())); + report_fatal_error(Twine(Buf)); } // We apply SymbolOffset here directly. We return it separately to allow // the caller to print it as an offset on the symbol name. @@ -1125,7 +1125,7 @@ bool Decoder::dumpXDataRecord(const COFFObjectFile &COFF, std::string Buf; llvm::raw_string_ostream OS(Buf); logAllUnhandledErrors(Name.takeError(), OS); - report_fatal_error(Twine(OS.str())); + report_fatal_error(Twine(Buf)); } ListScope EHS(SW, "ExceptionHandler"); @@ -1164,7 +1164,7 @@ bool Decoder::dumpUnpackedEntry(const COFFObjectFile &COFF, std::string Buf; llvm::raw_string_ostream OS(Buf); logAllUnhandledErrors(FunctionNameOrErr.takeError(), OS); - report_fatal_error(Twine(OS.str())); + report_fatal_error(Twine(Buf)); } FunctionName = *FunctionNameOrErr; } @@ -1178,7 +1178,7 @@ bool Decoder::dumpUnpackedEntry(const COFFObjectFile &COFF, std::string Buf; llvm::raw_string_ostream OS(Buf); logAllUnhandledErrors(Name.takeError(), OS); - report_fatal_error(Twine(OS.str())); + report_fatal_error(Twine(Buf)); } SW.printString("ExceptionRecord", @@ -1223,7 +1223,7 @@ bool Decoder::dumpPackedEntry(const object::COFFObjectFile &COFF, std::string Buf; llvm::raw_string_ostream OS(Buf); logAllUnhandledErrors(FunctionNameOrErr.takeError(), OS); - report_fatal_error(Twine(OS.str())); + report_fatal_error(Twine(Buf)); } FunctionName = *FunctionNameOrErr; } @@ -1322,7 +1322,7 @@ bool Decoder::dumpPackedARM64Entry(const object::COFFObjectFile &COFF, std::string Buf; llvm::raw_string_ostream OS(Buf); logAllUnhandledErrors(FunctionNameOrErr.takeError(), OS); - report_fatal_error(Twine(OS.str())); + report_fatal_error(Twine(Buf)); } FunctionName = *FunctionNameOrErr; } diff --git a/llvm/tools/llvm-xray/xray-graph.cpp b/llvm/tools/llvm-xray/xray-graph.cpp index de67993..a97aacf 100644 --- a/llvm/tools/llvm-xray/xray-graph.cpp +++ b/llvm/tools/llvm-xray/xray-graph.cpp @@ -368,7 +368,7 @@ GraphRenderer::TimeStat::getString(GraphRenderer::StatType T) const { static_cast<int>(GraphRenderer::StatType::MIN)]; break; } - return S.str(); + return St; } // Returns the quotient between the property T of this and another TimeStat as |