Update for LLVM api change

llvm-svn: 216396
This commit is contained in:
Rafael Espindola
2014-08-25 18:17:00 +00:00
parent 0941b568ce
commit b14bd53e6d
6 changed files with 22 additions and 27 deletions

View File

@@ -247,11 +247,11 @@ static bool writeModuleMap(llvm::StringRef ModuleMapPath,
}
// Set up module map output file.
std::string Error;
llvm::tool_output_file Out(FilePath.c_str(), Error, llvm::sys::fs::F_Text);
if (!Error.empty()) {
llvm::errs() << Argv0 << ": error opening " << FilePath << ":" << Error
<< "\n";
std::error_code EC;
llvm::tool_output_file Out(FilePath, EC, llvm::sys::fs::F_Text);
if (EC) {
llvm::errs() << Argv0 << ": error opening " << FilePath << ":"
<< EC.message() << "\n";
return false;
}