errs() << "Writing '" << Filename << "'...";
- raw_fd_ostream File(Filename.c_str(), ErrorInfo);
+ raw_fd_ostream File(Filename.c_str(), ErrorInfo, sys::fs::F_None);
std::string GraphName = DOTGraphTraits<GraphT>::getGraphName(Graph);
std::string Title = GraphName + " for '" + F.getName().str() + "' function";
errs() << "Writing '" << Filename << "'...";
- raw_fd_ostream File(Filename.c_str(), ErrorInfo);
+ raw_fd_ostream File(Filename.c_str(), ErrorInfo, sys::fs::F_None);
std::string Title = DOTGraphTraits<GraphT>::getGraphName(Graph);
if (ErrorInfo.empty())
/// tool_output_file - This constructor's arguments are passed to
/// to raw_fd_ostream's constructor.
tool_output_file(const char *filename, std::string &ErrorInfo,
- sys::fs::OpenFlags Flags = sys::fs::F_None);
+ sys::fs::OpenFlags Flags);
tool_output_file(const char *Filename, int FD);
/// file descriptor when it is done (this is necessary to detect
/// output errors).
raw_fd_ostream(const char *Filename, std::string &ErrorInfo,
- sys::fs::OpenFlags Flags = sys::fs::F_None);
+ sys::fs::OpenFlags Flags);
/// raw_fd_ostream ctor - FD is the file descriptor that this writes to. If
/// ShouldClose is true, this closes the file when the stream is destroyed.
errs() << "Writing '" << Filename << "'...";
std::string ErrorInfo;
- raw_fd_ostream File(Filename.c_str(), ErrorInfo);
+ raw_fd_ostream File(Filename.c_str(), ErrorInfo, sys::fs::F_None);
if (ErrorInfo.empty())
WriteGraph(File, (const Function*)&F);
errs() << "Writing '" << Filename << "'...";
std::string ErrorInfo;
- raw_fd_ostream File(Filename.c_str(), ErrorInfo);
+ raw_fd_ostream File(Filename.c_str(), ErrorInfo, sys::fs::F_None);
if (ErrorInfo.empty())
WriteGraph(File, (const Function*)&F, true);
rs << round;
std::string graphFileName(fqn + "." + rs.str() + ".pbqpgraph");
std::string tmp;
- raw_fd_ostream os(graphFileName.c_str(), tmp);
+ raw_fd_ostream os(graphFileName.c_str(), tmp, sys::fs::F_None);
DEBUG(dbgs() << "Dumping graph for round " << round << " to \""
<< graphFileName << "\"\n");
problem->getGraph().dump(os);
LLVMBool LLVMPrintModuleToFile(LLVMModuleRef M, const char *Filename,
char **ErrorMessage) {
std::string error;
- raw_fd_ostream dest(Filename, error);
+ raw_fd_ostream dest(Filename, error, sys::fs::F_None);
if (!error.empty()) {
*ErrorMessage = strdup(error.c_str());
return true;
std::string CoveragePath = mangleCoveragePath(Filename,
Options.PreservePaths);
std::string ErrorInfo;
- raw_fd_ostream OS(CoveragePath.c_str(), ErrorInfo);
+ raw_fd_ostream OS(CoveragePath.c_str(), ErrorInfo, sys::fs::F_None);
if (!ErrorInfo.empty())
errs() << ErrorInfo << "\n";
return 1;
}
std::string Error;
- tool_output_file DepOut(DependFilename.c_str(), Error);
+ tool_output_file DepOut(DependFilename.c_str(), Error, sys::fs::F_None);
if (!Error.empty()) {
errs() << argv0 << ": error opening " << DependFilename
<< ":" << Error << "\n";
return 1;
std::string Error;
- tool_output_file Out(OutputFilename.c_str(), Error);
+ tool_output_file Out(OutputFilename.c_str(), Error, sys::fs::F_None);
if (!Error.empty()) {
errs() << argv0 << ": error opening " << OutputFilename
<< ":" << Error << "\n";
if (!fd) {
std::string Path = getPath();
- Out.reset(new raw_fd_ostream(Path.c_str(), error));
+ Out.reset(new raw_fd_ostream(Path.c_str(), error, sys::fs::F_None));
DEBUG(dbgs() << "WRITING debug bitcode from Module " << M << " to file "
<< Path << "\n");
} else {
MCInstPrinter *IP) {
// Start a new dot file.
std::string Error;
- raw_fd_ostream Out(FileName, Error);
+ raw_fd_ostream Out(FileName, Error, sys::fs::F_None);
if (!Error.empty()) {
errs() << "llvm-objdump: warning: " << Error << '\n';
return;
}
if (!YAMLCFG.empty()) {
std::string Error;
- raw_fd_ostream YAMLOut(YAMLCFG.c_str(), Error);
+ raw_fd_ostream YAMLOut(YAMLCFG.c_str(), Error, sys::fs::F_None);
if (!Error.empty()) {
errs() << ToolName << ": warning: " << Error << '\n';
return;
OutputFilename = "-";
std::string ErrorInfo;
- raw_fd_ostream Output(OutputFilename.data(), ErrorInfo);
+ raw_fd_ostream Output(OutputFilename.data(), ErrorInfo, sys::fs::F_None);
if (!ErrorInfo.empty())
exitWithError(ErrorInfo, OutputFilename);