| Index: tools/pnacl-thaw/pnacl-thaw.cpp
|
| diff --git a/tools/pnacl-thaw/pnacl-thaw.cpp b/tools/pnacl-thaw/pnacl-thaw.cpp
|
| index 10fb2f4c5274a2d93e26b6500ff2e777853830f3..4b993e320d83acb83daf05f4cab2187c47d7334c 100644
|
| --- a/tools/pnacl-thaw/pnacl-thaw.cpp
|
| +++ b/tools/pnacl-thaw/pnacl-thaw.cpp
|
| @@ -21,7 +21,7 @@
|
| #include "llvm/Support/ManagedStatic.h"
|
| #include "llvm/Support/PrettyStackTrace.h"
|
| #include "llvm/Support/Signals.h"
|
| -#include "llvm/Support/StreamableMemoryObject.h"
|
| +#include "llvm/Support/StreamingMemoryObject.h"
|
| #include "llvm/Support/ToolOutputFile.h"
|
|
|
| using namespace llvm;
|
| @@ -41,11 +41,11 @@ VerboseErrors(
|
|
|
| static void WriteOutputFile(const Module *M) {
|
|
|
| - std::string ErrorInfo;
|
| + std::error_code EC;
|
| std::unique_ptr<tool_output_file> Out(
|
| - new tool_output_file(OutputFilename.c_str(), ErrorInfo, sys::fs::F_None));
|
| - if (!ErrorInfo.empty()) {
|
| - errs() << ErrorInfo << '\n';
|
| + new tool_output_file(OutputFilename, EC, sys::fs::F_None));
|
| + if (EC) {
|
| + errs() << EC.message() << '\n';
|
| exit(1);
|
| }
|
|
|
|
|