outs().flush();
WithColor::warning(errs(), ToolName)
<< "'" << File << "': " << Message << "\n";
- errs().flush();
}
LLVM_ATTRIBUTE_NORETURN void reportError(StringRef File, Twine Message) {
+ outs().flush();
WithColor::error(errs(), ToolName) << "'" << File << "': " << Message << "\n";
exit(1);
}
StringRef ArchiveName,
StringRef ArchitectureName) {
assert(E);
+ outs().flush();
WithColor::error(errs(), ToolName);
if (ArchiveName != "")
errs() << ArchiveName << "(" << FileName << ")";
errs() << "'" << FileName << "'";
if (!ArchitectureName.empty())
errs() << " (for architecture " << ArchitectureName << ")";
- std::string Buf;
- raw_string_ostream OS(Buf);
- logAllUnhandledErrors(std::move(E), OS);
- OS.flush();
- errs() << ": " << Buf;
+ errs() << ": ";
+ logAllUnhandledErrors(std::move(E), errs());
exit(1);
}