From a503ede94bee1054fcd142687508dbb959e36875 Mon Sep 17 00:00:00 2001 From: Benjamin Kramer Date: Fri, 22 Jul 2011 18:35:11 +0000 Subject: [PATCH] llvm-objdump: Don't ignore errors from raw_fd_ostream. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135787 91177308-0d34-0410-b5e6-96231b3b80d8 --- tools/llvm-objdump/llvm-objdump.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/llvm-objdump/llvm-objdump.cpp b/tools/llvm-objdump/llvm-objdump.cpp index 2efdc0de036..c1e35cd164f 100644 --- a/tools/llvm-objdump/llvm-objdump.cpp +++ b/tools/llvm-objdump/llvm-objdump.cpp @@ -272,6 +272,10 @@ static void DisassembleInput(const StringRef &Filename) { // Start a new dot file. std::string Error; raw_fd_ostream Out((f.getName().str() + ".dot").c_str(), Error); + if (!Error.empty()) { + errs() << ToolName << ": warning: " << Error << '\n'; + continue; + } Out << "digraph " << f.getName() << " {\n"; Out << "graph [ rankdir = \"LR\" ];\n";