summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2014-02-24 15:07:20 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2014-02-24 15:07:20 +0000
commit843efd49b700018b515f66e585012e770feafd55 (patch)
tree63fbb3820fdbe73e57a82245d1a233fc784e39f6
parent281d7fc2d92545b8428a5aa0e59238d445fb8199 (diff)
downloadllvm-843efd49b700018b515f66e585012e770feafd55.tar.gz
llvm-843efd49b700018b515f66e585012e770feafd55.tar.bz2
llvm-843efd49b700018b515f66e585012e770feafd55.tar.xz
Don't make F_None the default.
This will make it easier to switch the default to being binary files. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202042 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/llvm/Analysis/DOTGraphTraitsPass.h4
-rw-r--r--include/llvm/Support/ToolOutputFile.h2
-rw-r--r--include/llvm/Support/raw_ostream.h2
-rw-r--r--lib/Analysis/CFGPrinter.cpp4
-rw-r--r--lib/CodeGen/RegAllocPBQP.cpp2
-rw-r--r--lib/IR/Core.cpp2
-rw-r--r--lib/IR/GCOV.cpp2
-rw-r--r--lib/TableGen/Main.cpp4
-rw-r--r--lib/Transforms/Instrumentation/DebugIR.cpp2
-rw-r--r--tools/llvm-objdump/llvm-objdump.cpp4
-rw-r--r--tools/llvm-profdata/llvm-profdata.cpp2
11 files changed, 15 insertions, 15 deletions
diff --git a/include/llvm/Analysis/DOTGraphTraitsPass.h b/include/llvm/Analysis/DOTGraphTraitsPass.h
index ed26a06a58..6a6abc20e0 100644
--- a/include/llvm/Analysis/DOTGraphTraitsPass.h
+++ b/include/llvm/Analysis/DOTGraphTraitsPass.h
@@ -69,7 +69,7 @@ public:
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";
@@ -132,7 +132,7 @@ public:
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())
diff --git a/include/llvm/Support/ToolOutputFile.h b/include/llvm/Support/ToolOutputFile.h
index a2191ade80..88f8ccc292 100644
--- a/include/llvm/Support/ToolOutputFile.h
+++ b/include/llvm/Support/ToolOutputFile.h
@@ -47,7 +47,7 @@ public:
/// 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);
diff --git a/include/llvm/Support/raw_ostream.h b/include/llvm/Support/raw_ostream.h
index ec7e06b535..e0048f5140 100644
--- a/include/llvm/Support/raw_ostream.h
+++ b/include/llvm/Support/raw_ostream.h
@@ -347,7 +347,7 @@ public:
/// 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.
diff --git a/lib/Analysis/CFGPrinter.cpp b/lib/Analysis/CFGPrinter.cpp
index 9b6879a42e..3c67618450 100644
--- a/lib/Analysis/CFGPrinter.cpp
+++ b/lib/Analysis/CFGPrinter.cpp
@@ -80,7 +80,7 @@ namespace {
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);
@@ -114,7 +114,7 @@ namespace {
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);
diff --git a/lib/CodeGen/RegAllocPBQP.cpp b/lib/CodeGen/RegAllocPBQP.cpp
index 483f2e1ae8..56fdb45f4e 100644
--- a/lib/CodeGen/RegAllocPBQP.cpp
+++ b/lib/CodeGen/RegAllocPBQP.cpp
@@ -595,7 +595,7 @@ bool RegAllocPBQP::runOnMachineFunction(MachineFunction &MF) {
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);
diff --git a/lib/IR/Core.cpp b/lib/IR/Core.cpp
index 3a6a0b0b44..dbaf02edf6 100644
--- a/lib/IR/Core.cpp
+++ b/lib/IR/Core.cpp
@@ -130,7 +130,7 @@ void LLVMDumpModule(LLVMModuleRef M) {
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;
diff --git a/lib/IR/GCOV.cpp b/lib/IR/GCOV.cpp
index 01759ca96b..3311d2ef42 100644
--- a/lib/IR/GCOV.cpp
+++ b/lib/IR/GCOV.cpp
@@ -482,7 +482,7 @@ void FileInfo::print(StringRef GCNOFile, StringRef GCDAFile) {
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";
diff --git a/lib/TableGen/Main.cpp b/lib/TableGen/Main.cpp
index 7fe47bcb7e..cf0d88b513 100644
--- a/lib/TableGen/Main.cpp
+++ b/lib/TableGen/Main.cpp
@@ -57,7 +57,7 @@ static int createDependencyFile(const TGParser &Parser, const char *argv0) {
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";
@@ -103,7 +103,7 @@ int TableGenMain(char *argv0, TableGenMainFn *MainFn) {
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";
diff --git a/lib/Transforms/Instrumentation/DebugIR.cpp b/lib/Transforms/Instrumentation/DebugIR.cpp
index 9ad6c472b9..1100689fb7 100644
--- a/lib/Transforms/Instrumentation/DebugIR.cpp
+++ b/lib/Transforms/Instrumentation/DebugIR.cpp
@@ -528,7 +528,7 @@ void DebugIR::writeDebugBitcode(const Module *M, int *fd) {
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 {
diff --git a/tools/llvm-objdump/llvm-objdump.cpp b/tools/llvm-objdump/llvm-objdump.cpp
index 3b87507af0..e090f688a4 100644
--- a/tools/llvm-objdump/llvm-objdump.cpp
+++ b/tools/llvm-objdump/llvm-objdump.cpp
@@ -192,7 +192,7 @@ static void emitDOTFile(const char *FileName, const MCFunction &f,
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;
@@ -373,7 +373,7 @@ static void DisassembleObject(const ObjectFile *Obj, bool InlineRelocs) {
}
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;
diff --git a/tools/llvm-profdata/llvm-profdata.cpp b/tools/llvm-profdata/llvm-profdata.cpp
index df10356eef..b2f52b29dc 100644
--- a/tools/llvm-profdata/llvm-profdata.cpp
+++ b/tools/llvm-profdata/llvm-profdata.cpp
@@ -112,7 +112,7 @@ int main(int argc, char **argv) {
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);