]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - opencl/llvm.git/commitdiff
Don't make F_None the default.
authorRafael Espindola <rafael.espindola@gmail.com>
Mon, 24 Feb 2014 15:07:20 +0000 (15:07 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Mon, 24 Feb 2014 15:07:20 +0000 (15:07 +0000)
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

include/llvm/Analysis/DOTGraphTraitsPass.h
include/llvm/Support/ToolOutputFile.h
include/llvm/Support/raw_ostream.h
lib/Analysis/CFGPrinter.cpp
lib/CodeGen/RegAllocPBQP.cpp
lib/IR/Core.cpp
lib/IR/GCOV.cpp
lib/TableGen/Main.cpp
lib/Transforms/Instrumentation/DebugIR.cpp
tools/llvm-objdump/llvm-objdump.cpp
tools/llvm-profdata/llvm-profdata.cpp

index ed26a06a581a65be0d26e50fe073f3a9621ccaee..6a6abc20e03bf9869393c0dba0ebad10a1d2e0e0 100644 (file)
@@ -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())
index a2191ade80cf8ba1248fce198bf061fecda85030..88f8ccc292d354a644b9a53c3ae9807445728006 100644 (file)
@@ -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);
 
index ec7e06b535e59c66a0d96d2153a160f29490b1a5..e0048f514087b4d357a0d416f83e873410e1dad2 100644 (file)
@@ -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.
index 9b6879a42ed40b20c9eed997faa412e4302197dc..3c67618450ce7cd810349731ab84ae8318beb6f3 100644 (file)
@@ -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);
index 483f2e1ae8609eeed6fca19e67e878bba0eeb3b8..56fdb45f4e0b3b865107e97a3764c0e081e15e56 100644 (file)
@@ -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);
index 3a6a0b0b4471d230d2d6bfeceea85e92beeadf33..dbaf02edf6c8ea79d6cb507c5bd540a7e3cdb690 100644 (file)
@@ -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;
index 01759ca96bd79cc16b2a99f8af75717eb1ee5c38..3311d2ef42eb9da86f6566347aea6d8486bb6b62 100644 (file)
@@ -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";
 
index 7fe47bcb7e411a932a9165fe993de1815c15b810..cf0d88b513e49df80354882f3989cb600f82f2dd 100644 (file)
@@ -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";
index 9ad6c472b9bac4f173ed9a31b5976a3026a378d9..1100689fb7e638d8c04d753d7513fe955deae3d6 100644 (file)
@@ -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 {
index 3b87507af0a1c4d93fe74afe560a1acfd7b8329f..e090f688a4b666f7e62b2ecf71ef26950c252585 100644 (file)
@@ -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;
index df10356eeff2e8e4c8675c8e809ee0b59d1584ce..b2f52b29dc1eeb88281a9fdffa5ea46fc5f5be75 100644 (file)
@@ -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);