Update for LLVM api change

llvm-svn: 216394
This commit is contained in:
Rafael Espindola 2014-08-25 18:16:52 +00:00
parent 3fd1e9933f
commit ac27f730d7

View File

@ -130,14 +130,14 @@ bool JSONExporter::runOnScop(Scop &scop) {
std::string fileContent = writer.write(jscop);
// Write to file.
std::string ErrInfo;
tool_output_file F(FileName.c_str(), ErrInfo, llvm::sys::fs::F_Text);
std::error_code EC;
tool_output_file F(FileName, EC, llvm::sys::fs::F_Text);
std::string FunctionName = R.getEntry()->getParent()->getName();
errs() << "Writing JScop '" << R.getNameStr() << "' in function '"
<< FunctionName << "' to '" << FileName << "'.\n";
if (ErrInfo.empty()) {
if (!EC) {
F.os() << fileContent;
F.os().close();
if (!F.os().has_error()) {