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
This commit is contained in:
Benjamin Kramer 2011-07-22 18:35:11 +00:00
parent 83a162ef85
commit a503ede94b

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