llvm-objdump: Don't ignore errors from raw_fd_ostream.

llvm-svn: 135787
This commit is contained in:
Benjamin Kramer 2011-07-22 18:35:11 +00:00
parent cb2d7bee35
commit 39e05ac3d7
1 changed files with 4 additions and 0 deletions

View File

@ -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";