diff options
-rw-r--r-- | examples/BrainF/BrainFDriver.cpp | 1 | ||||
-rw-r--r-- | include/llvm/Support/GraphWriter.h | 2 | ||||
-rw-r--r-- | include/llvm/Support/raw_ostream.h | 11 | ||||
-rw-r--r-- | lib/Analysis/CFGPrinter.cpp | 4 | ||||
-rw-r--r-- | lib/Bitcode/Writer/BitWriter.cpp | 2 | ||||
-rw-r--r-- | lib/Support/raw_ostream.cpp | 12 | ||||
-rw-r--r-- | tools/bugpoint/ExtractFunction.cpp | 3 | ||||
-rw-r--r-- | tools/bugpoint/OptimizerDriver.cpp | 6 | ||||
-rw-r--r-- | tools/bugpoint/ToolRunner.cpp | 1 | ||||
-rw-r--r-- | tools/gold/gold-plugin.cpp | 2 | ||||
-rw-r--r-- | tools/llc/llc.cpp | 9 | ||||
-rw-r--r-- | tools/llvm-as/llvm-as.cpp | 5 | ||||
-rw-r--r-- | tools/llvm-dis/llvm-dis.cpp | 5 | ||||
-rw-r--r-- | tools/llvm-extract/llvm-extract.cpp | 12 | ||||
-rw-r--r-- | tools/llvm-ld/llvm-ld.cpp | 7 | ||||
-rw-r--r-- | tools/llvm-link/llvm-link.cpp | 12 | ||||
-rw-r--r-- | tools/llvm-mc/llvm-mc.cpp | 7 | ||||
-rw-r--r-- | tools/lto/LTOCodeGenerator.cpp | 5 | ||||
-rw-r--r-- | tools/opt/GraphPrinters.cpp | 2 | ||||
-rw-r--r-- | tools/opt/opt.cpp | 7 | ||||
-rw-r--r-- | utils/FileUpdate/FileUpdate.cpp | 2 | ||||
-rw-r--r-- | utils/TableGen/TableGen.cpp | 3 |
22 files changed, 48 insertions, 72 deletions
diff --git a/examples/BrainF/BrainFDriver.cpp b/examples/BrainF/BrainFDriver.cpp index ad8a922..6f4ba69 100644 --- a/examples/BrainF/BrainFDriver.cpp +++ b/examples/BrainF/BrainFDriver.cpp @@ -110,7 +110,6 @@ int main(int argc, char **argv) { if (OutputFilename != "-") { std::string ErrInfo; out = new raw_fd_ostream(OutputFilename.c_str(), ErrInfo, - raw_fd_ostream::F_Force| raw_fd_ostream::F_Binary); } } diff --git a/include/llvm/Support/GraphWriter.h b/include/llvm/Support/GraphWriter.h index b88dd3f..d5f2e74 100644 --- a/include/llvm/Support/GraphWriter.h +++ b/include/llvm/Support/GraphWriter.h @@ -274,7 +274,7 @@ sys::Path WriteGraph(const GraphType &G, const std::string &Name, errs() << "Writing '" << Filename.str() << "'... "; std::string ErrorInfo; - raw_fd_ostream O(Filename.c_str(), ErrorInfo, raw_fd_ostream::F_Force); + raw_fd_ostream O(Filename.c_str(), ErrorInfo); if (ErrorInfo.empty()) { WriteGraph(O, G, ShortNames, Name, Title); diff --git a/include/llvm/Support/raw_ostream.h b/include/llvm/Support/raw_ostream.h index 58253dd..a01d4cd 100644 --- a/include/llvm/Support/raw_ostream.h +++ b/include/llvm/Support/raw_ostream.h @@ -328,18 +328,17 @@ class raw_fd_ostream : public raw_ostream { public: enum { - /// F_Force - When opening a file, this flag makes raw_fd_ostream overwrite - /// a file if it already exists instead of emitting an error. This may not - /// be specified with F_Append. - F_Force = 1, + /// F_Excl - When opening a file, this flag makes raw_fd_ostream + /// report an error if the file already exists. + F_Excl = 1, /// F_Append - When opening a file, if it already exists append to the /// existing file instead of returning an error. This may not be specified - /// with F_Force. + /// with F_Excl. F_Append = 2, /// F_Binary - The file should be opened in binary mode on platforms that - /// support this distinction. + /// make this distinction. F_Binary = 4 }; diff --git a/lib/Analysis/CFGPrinter.cpp b/lib/Analysis/CFGPrinter.cpp index 4ac6b8d..03cfb9d 100644 --- a/lib/Analysis/CFGPrinter.cpp +++ b/lib/Analysis/CFGPrinter.cpp @@ -138,7 +138,7 @@ namespace { errs() << "Writing '" << Filename << "'..."; std::string ErrorInfo; - raw_fd_ostream File(Filename.c_str(), ErrorInfo, raw_fd_ostream::F_Force); + raw_fd_ostream File(Filename.c_str(), ErrorInfo); if (ErrorInfo.empty()) WriteGraph(File, (const Function*)&F); @@ -170,7 +170,7 @@ namespace { errs() << "Writing '" << Filename << "'..."; std::string ErrorInfo; - raw_fd_ostream File(Filename.c_str(), ErrorInfo, raw_fd_ostream::F_Force); + raw_fd_ostream File(Filename.c_str(), ErrorInfo); if (ErrorInfo.empty()) WriteGraph(File, (const Function*)&F, true); diff --git a/lib/Bitcode/Writer/BitWriter.cpp b/lib/Bitcode/Writer/BitWriter.cpp index 32a7405..7ed651b 100644 --- a/lib/Bitcode/Writer/BitWriter.cpp +++ b/lib/Bitcode/Writer/BitWriter.cpp @@ -18,7 +18,7 @@ using namespace llvm; int LLVMWriteBitcodeToFile(LLVMModuleRef M, const char *Path) { std::string ErrorInfo; raw_fd_ostream OS(Path, ErrorInfo, - raw_fd_ostream::F_Force|raw_fd_ostream::F_Binary); + raw_fd_ostream::F_Binary); if (!ErrorInfo.empty()) return -1; diff --git a/lib/Support/raw_ostream.cpp b/lib/Support/raw_ostream.cpp index 230d9a8..a229efd 100644 --- a/lib/Support/raw_ostream.cpp +++ b/lib/Support/raw_ostream.cpp @@ -335,9 +335,9 @@ void format_object_base::home() { /// if no error occurred. raw_fd_ostream::raw_fd_ostream(const char *Filename, std::string &ErrorInfo, unsigned Flags) : pos(0) { - // Verify that we don't have both "append" and "force". - assert((!(Flags & F_Force) || !(Flags & F_Append)) && - "Cannot specify both 'force' and 'append' file creation flags!"); + // Verify that we don't have both "append" and "excl". + assert((!(Flags & F_Excl) || !(Flags & F_Append)) && + "Cannot specify both 'excl' and 'append' file creation flags!"); ErrorInfo.clear(); @@ -358,11 +358,11 @@ raw_fd_ostream::raw_fd_ostream(const char *Filename, std::string &ErrorInfo, OpenFlags |= O_BINARY; #endif - if (Flags & F_Force) - OpenFlags |= O_TRUNC; - else if (Flags & F_Append) + if (Flags & F_Append) OpenFlags |= O_APPEND; else + OpenFlags |= O_TRUNC; + if (Flags & F_Excl) OpenFlags |= O_EXCL; FD = open(Filename, OpenFlags, 0664); diff --git a/tools/bugpoint/ExtractFunction.cpp b/tools/bugpoint/ExtractFunction.cpp index 31982e1..a54f51b 100644 --- a/tools/bugpoint/ExtractFunction.cpp +++ b/tools/bugpoint/ExtractFunction.cpp @@ -337,8 +337,7 @@ Module *BugDriver::ExtractMappedBlocksFromModule(const sys::RemoveFileOnSignal(uniqueFilename); std::string ErrorInfo; - raw_fd_ostream BlocksToNotExtractFile(uniqueFilename.c_str(), ErrorInfo, - raw_fd_ostream::F_Force); + raw_fd_ostream BlocksToNotExtractFile(uniqueFilename.c_str(), ErrorInfo); if (!ErrorInfo.empty()) { outs() << "*** Basic Block extraction failed!\n"; errs() << "Error writing list of blocks to not extract: " << ErrorInfo diff --git a/tools/bugpoint/OptimizerDriver.cpp b/tools/bugpoint/OptimizerDriver.cpp index 0c9037f..5afb220 100644 --- a/tools/bugpoint/OptimizerDriver.cpp +++ b/tools/bugpoint/OptimizerDriver.cpp @@ -53,7 +53,7 @@ bool BugDriver::writeProgramToFile(const std::string &Filename, Module *M) const { std::string ErrInfo; raw_fd_ostream Out(Filename.c_str(), ErrInfo, - raw_fd_ostream::F_Force|raw_fd_ostream::F_Binary); + raw_fd_ostream::F_Binary); if (!ErrInfo.empty()) return true; WriteBitcodeToFile(M ? M : Program, Out); @@ -85,7 +85,7 @@ void BugDriver::EmitProgressBitcode(const std::string &ID, bool NoFlyer) { int BugDriver::runPassesAsChild(const std::vector<const PassInfo*> &Passes) { std::string ErrInfo; raw_fd_ostream OutFile(ChildOutput.c_str(), ErrInfo, - raw_fd_ostream::F_Force|raw_fd_ostream::F_Binary); + raw_fd_ostream::F_Binary); if (!ErrInfo.empty()) { errs() << "Error opening bitcode file: " << ChildOutput << "\n"; return 1; @@ -148,7 +148,7 @@ bool BugDriver::runPasses(const std::vector<const PassInfo*> &Passes, std::string ErrInfo; raw_fd_ostream InFile(inputFilename.c_str(), ErrInfo, - raw_fd_ostream::F_Force|raw_fd_ostream::F_Binary); + raw_fd_ostream::F_Binary); if (!ErrInfo.empty()) { diff --git a/tools/bugpoint/ToolRunner.cpp b/tools/bugpoint/ToolRunner.cpp index f6fc37e..4551d41 100644 --- a/tools/bugpoint/ToolRunner.cpp +++ b/tools/bugpoint/ToolRunner.cpp @@ -368,7 +368,6 @@ GCC::FileType LLC::OutputCode(const std::string &Bitcode, LLCArgs.push_back ("-o"); LLCArgs.push_back (OutputAsmFile.c_str()); // Output to the Asm file - LLCArgs.push_back ("-f"); // Overwrite as necessary... LLCArgs.push_back (Bitcode.c_str()); // This is the input bitcode LLCArgs.push_back (0); diff --git a/tools/gold/gold-plugin.cpp b/tools/gold/gold-plugin.cpp index 16b3471..6520617 100644 --- a/tools/gold/gold-plugin.cpp +++ b/tools/gold/gold-plugin.cpp @@ -364,7 +364,7 @@ ld_plugin_status all_symbols_read_hook(void) { } raw_fd_ostream *objFile = new raw_fd_ostream(uniqueObjPath.c_str(), ErrMsg, - raw_fd_ostream::F_Force|raw_fd_ostream::F_Binary); + raw_fd_ostream::F_Binary); if (!ErrMsg.empty()) { delete objFile; (*message)(LDPL_ERROR, "%s", ErrMsg.c_str()); diff --git a/tools/llc/llc.cpp b/tools/llc/llc.cpp index 423cf47..c194709 100644 --- a/tools/llc/llc.cpp +++ b/tools/llc/llc.cpp @@ -55,7 +55,8 @@ InputFilename(cl::Positional, cl::desc("<input bitcode>"), cl::init("-")); static cl::opt<std::string> OutputFilename("o", cl::desc("Output filename"), cl::value_desc("filename")); -static cl::opt<bool> Force("f", cl::desc("Overwrite output files")); +static cl::opt<bool> +Force("f", cl::desc("Enable binary output on terminals")); // Determine optimization level. static cl::opt<char> @@ -139,12 +140,9 @@ static formatted_raw_ostream *GetOutputStream(const char *TargetName, std::string error; raw_fd_ostream *FDOut = new raw_fd_ostream(OutputFilename.c_str(), error, - (Force ? raw_fd_ostream::F_Force : 0)| raw_fd_ostream::F_Binary); if (!error.empty()) { errs() << error << '\n'; - if (!Force) - errs() << "Use -f command line argument to force output\n"; delete FDOut; return 0; } @@ -190,14 +188,11 @@ static formatted_raw_ostream *GetOutputStream(const char *TargetName, std::string error; unsigned OpenFlags = 0; - if (Force) OpenFlags |= raw_fd_ostream::F_Force; if (Binary) OpenFlags |= raw_fd_ostream::F_Binary; raw_fd_ostream *FDOut = new raw_fd_ostream(OutputFilename.c_str(), error, OpenFlags); if (!error.empty()) { errs() << error << '\n'; - if (!Force) - errs() << "Use -f command line argument to force output\n"; delete FDOut; return 0; } diff --git a/tools/llvm-as/llvm-as.cpp b/tools/llvm-as/llvm-as.cpp index 487e904..9027cfc 100644 --- a/tools/llvm-as/llvm-as.cpp +++ b/tools/llvm-as/llvm-as.cpp @@ -38,7 +38,7 @@ OutputFilename("o", cl::desc("Override output filename"), cl::value_desc("filename")); static cl::opt<bool> -Force("f", cl::desc("Overwrite output files")); +Force("f", cl::desc("Enable binary output on terminals")); static cl::opt<bool> DisableOutput("disable-output", cl::desc("Disable output"), cl::init(false)); @@ -98,12 +98,9 @@ int main(int argc, char **argv) { std::string ErrorInfo; std::auto_ptr<raw_ostream> Out (new raw_fd_ostream(OutputFilename.c_str(), ErrorInfo, - (Force?raw_fd_ostream::F_Force : 0) | raw_fd_ostream::F_Binary)); if (!ErrorInfo.empty()) { errs() << ErrorInfo << '\n'; - if (!Force) - errs() << "Use -f command line argument to force output\n"; return 1; } diff --git a/tools/llvm-dis/llvm-dis.cpp b/tools/llvm-dis/llvm-dis.cpp index 2066fff..89073c0 100644 --- a/tools/llvm-dis/llvm-dis.cpp +++ b/tools/llvm-dis/llvm-dis.cpp @@ -38,7 +38,7 @@ OutputFilename("o", cl::desc("Override output filename"), cl::value_desc("filename")); static cl::opt<bool> -Force("f", cl::desc("Overwrite output files")); +Force("f", cl::desc("Enable binary output on terminals")); static cl::opt<bool> DontPrint("disable-output", cl::desc("Don't output the .ll file"), cl::Hidden); @@ -93,12 +93,9 @@ int main(int argc, char **argv) { std::string ErrorInfo; std::auto_ptr<raw_fd_ostream> Out(new raw_fd_ostream(OutputFilename.c_str(), ErrorInfo, - (Force?raw_fd_ostream::F_Force : 0) | raw_fd_ostream::F_Binary)); if (!ErrorInfo.empty()) { errs() << ErrorInfo << '\n'; - if (!Force) - errs() << "Use -f command line argument to force output\n"; return 1; } diff --git a/tools/llvm-extract/llvm-extract.cpp b/tools/llvm-extract/llvm-extract.cpp index 4ea9dd8..543d01f 100644 --- a/tools/llvm-extract/llvm-extract.cpp +++ b/tools/llvm-extract/llvm-extract.cpp @@ -23,6 +23,7 @@ #include "llvm/Support/MemoryBuffer.h" #include "llvm/Support/PrettyStackTrace.h" #include "llvm/Support/raw_ostream.h" +#include "llvm/Support/SystemUtils.h" #include "llvm/System/Signals.h" #include <memory> using namespace llvm; @@ -37,7 +38,7 @@ OutputFilename("o", cl::desc("Specify output filename"), cl::value_desc("filename"), cl::init("-")); static cl::opt<bool> -Force("f", cl::desc("Overwrite output files")); +Force("f", cl::desc("Enable binary output on terminals")); static cl::opt<bool> DeleteFn("delete", cl::desc("Delete specified Globals from Module")); @@ -113,16 +114,15 @@ int main(int argc, char **argv) { std::string ErrorInfo; std::auto_ptr<raw_fd_ostream> Out(new raw_fd_ostream(OutputFilename.c_str(), ErrorInfo, - raw_fd_ostream::F_Binary | - (Force ? raw_fd_ostream::F_Force : 0))); + raw_fd_ostream::F_Binary)); if (!ErrorInfo.empty()) { errs() << ErrorInfo << '\n'; - if (!Force) - errs() << "Use -f command line argument to force output\n"; return 1; } - Passes.add(createBitcodeWriterPass(*Out)); + if (Force || !CheckBitcodeOutputToConsole(*Out, true)) + Passes.add(createBitcodeWriterPass(*Out)); + Passes.run(*M.get()); return 0; diff --git a/tools/llvm-ld/llvm-ld.cpp b/tools/llvm-ld/llvm-ld.cpp index 8fcaefd..ef3c250 100644 --- a/tools/llvm-ld/llvm-ld.cpp +++ b/tools/llvm-ld/llvm-ld.cpp @@ -12,7 +12,7 @@ // Additionally, this program outputs a shell script that is used to invoke LLI // to execute the program. In this manner, the generated executable (a.out for // example), is directly executable, whereas the bitcode file actually lives in -// the a.out.bc file generated by this program. Also, Force is on by default. +// the a.out.bc file generated by this program. // // Note that if someone (or a script) deletes the executable program generated, // the .bc file will be left around. Considering that this is a temporary hack, @@ -231,7 +231,7 @@ void GenerateBitcode(Module* M, const std::string& FileName) { // Create the output file. std::string ErrorInfo; raw_fd_ostream Out(FileName.c_str(), ErrorInfo, - raw_fd_ostream::F_Force | raw_fd_ostream::F_Binary); + raw_fd_ostream::F_Binary); if (!ErrorInfo.empty()) PrintAndExit(ErrorInfo); @@ -428,8 +428,7 @@ static void EmitShellScript(char **argv) { // Output the script to start the program... std::string ErrorInfo; - raw_fd_ostream Out2(OutputFilename.c_str(), ErrorInfo, - llvm::raw_fd_ostream::F_Force); + raw_fd_ostream Out2(OutputFilename.c_str(), ErrorInfo); if (!ErrorInfo.empty()) PrintAndExit(ErrorInfo); diff --git a/tools/llvm-link/llvm-link.cpp b/tools/llvm-link/llvm-link.cpp index 6dc04e6..14327af 100644 --- a/tools/llvm-link/llvm-link.cpp +++ b/tools/llvm-link/llvm-link.cpp @@ -22,6 +22,7 @@ #include "llvm/Support/MemoryBuffer.h" #include "llvm/Support/PrettyStackTrace.h" #include "llvm/Support/raw_ostream.h" +#include "llvm/Support/SystemUtils.h" #include "llvm/System/Signals.h" #include "llvm/System/Path.h" #include <memory> @@ -35,7 +36,8 @@ static cl::opt<std::string> OutputFilename("o", cl::desc("Override output filename"), cl::init("-"), cl::value_desc("filename")); -static cl::opt<bool> Force("f", cl::desc("Overwrite output files")); +static cl::opt<bool> +Force("f", cl::desc("Enable binary output on terminals")); static cl::opt<bool> Verbose("v", cl::desc("Print information about actions taken")); @@ -122,12 +124,9 @@ int main(int argc, char **argv) { std::string ErrorInfo; std::auto_ptr<raw_ostream> Out(new raw_fd_ostream(OutputFilename.c_str(), ErrorInfo, - raw_fd_ostream::F_Binary | - (Force ? raw_fd_ostream::F_Force : 0))); + raw_fd_ostream::F_Binary)); if (!ErrorInfo.empty()) { errs() << ErrorInfo << '\n'; - if (!Force) - errs() << "Use -f command line argument to force output\n"; return 1; } @@ -142,7 +141,8 @@ int main(int argc, char **argv) { } if (Verbose) errs() << "Writing bitcode...\n"; - WriteBitcodeToFile(Composite.get(), *Out); + if (Force || !CheckBitcodeOutputToConsole(*Out, true)) + WriteBitcodeToFile(Composite.get(), *Out); return 0; } diff --git a/tools/llvm-mc/llvm-mc.cpp b/tools/llvm-mc/llvm-mc.cpp index af72fbc..27fb53b 100644 --- a/tools/llvm-mc/llvm-mc.cpp +++ b/tools/llvm-mc/llvm-mc.cpp @@ -53,7 +53,7 @@ FileType("filetype", cl::init(OFT_AssemblyFile), clEnumValEnd)); static cl::opt<bool> -Force("f", cl::desc("Overwrite output files")); +Force("f", cl::desc("Enable binary output on terminals")); static cl::list<std::string> IncludeDirs("I", cl::desc("Directory of include files"), @@ -184,12 +184,9 @@ static formatted_raw_ostream *GetOutputStream() { std::string Err; raw_fd_ostream *Out = new raw_fd_ostream(OutputFilename.c_str(), Err, - raw_fd_ostream::F_Binary | - (Force ? raw_fd_ostream::F_Force : 0)); + raw_fd_ostream::F_Binary); if (!Err.empty()) { errs() << Err << '\n'; - if (!Force) - errs() << "Use -f command line argument to force output\n"; delete Out; return 0; } diff --git a/tools/lto/LTOCodeGenerator.cpp b/tools/lto/LTOCodeGenerator.cpp index 4bd754c..37f7786 100644 --- a/tools/lto/LTOCodeGenerator.cpp +++ b/tools/lto/LTOCodeGenerator.cpp @@ -148,7 +148,7 @@ bool LTOCodeGenerator::writeMergedModules(const char *path, // create output file std::string ErrInfo; raw_fd_ostream Out(path, ErrInfo, - raw_fd_ostream::F_Force|raw_fd_ostream::F_Binary); + raw_fd_ostream::F_Binary); if (!ErrInfo.empty()) { errMsg = "could not open bitcode file for writing: "; errMsg += path; @@ -179,8 +179,7 @@ const void* LTOCodeGenerator::compile(size_t* length, std::string& errMsg) // generate assembly code bool genResult = false; { - raw_fd_ostream asmFD(uniqueAsmPath.c_str(), errMsg, - raw_fd_ostream::F_Force); + raw_fd_ostream asmFD(uniqueAsmPath.c_str(), errMsg); formatted_raw_ostream asmFile(asmFD); if (!errMsg.empty()) return NULL; diff --git a/tools/opt/GraphPrinters.cpp b/tools/opt/GraphPrinters.cpp index c38469c..1ae6be2 100644 --- a/tools/opt/GraphPrinters.cpp +++ b/tools/opt/GraphPrinters.cpp @@ -29,7 +29,7 @@ static void WriteGraphToFile(std::ostream &O, const std::string &GraphName, std::string Filename = GraphName + ".dot"; O << "Writing '" << Filename << "'..."; std::string ErrInfo; - raw_fd_ostream F(Filename.c_str(), ErrInfo, raw_fd_ostream::F_Force); + raw_fd_ostream F(Filename.c_str(), ErrInfo); if (ErrInfo.empty()) WriteGraph(F, GT); diff --git a/tools/opt/opt.cpp b/tools/opt/opt.cpp index 7753c21..6effa48 100644 --- a/tools/opt/opt.cpp +++ b/tools/opt/opt.cpp @@ -55,7 +55,7 @@ OutputFilename("o", cl::desc("Override output filename"), cl::value_desc("filename"), cl::init("-")); static cl::opt<bool> -Force("f", cl::desc("Overwrite output files")); +Force("f", cl::desc("Enable binary output on terminals")); static cl::opt<bool> PrintEachXForm("p", cl::desc("Print module after each transformation")); @@ -367,12 +367,9 @@ int main(int argc, char **argv) { if (OutputFilename != "-") { std::string ErrorInfo; Out = new raw_fd_ostream(OutputFilename.c_str(), ErrorInfo, - raw_fd_ostream::F_Binary | - (Force ? raw_fd_ostream::F_Force : 0)); + raw_fd_ostream::F_Binary); if (!ErrorInfo.empty()) { errs() << ErrorInfo << '\n'; - if (!Force) - errs() << "Use -f command line argument to force output\n"; delete Out; return 1; } diff --git a/utils/FileUpdate/FileUpdate.cpp b/utils/FileUpdate/FileUpdate.cpp index da760e6..26fd75e 100644 --- a/utils/FileUpdate/FileUpdate.cpp +++ b/utils/FileUpdate/FileUpdate.cpp @@ -66,7 +66,7 @@ int main(int argc, char **argv) { outs() << argv[0] << ": Updating '" << OutputFilename << "', contents changed.\n"; raw_fd_ostream OutStream(OutputFilename.c_str(), ErrorStr, - raw_fd_ostream::F_Force|raw_fd_ostream::F_Binary); + raw_fd_ostream::F_Binary); if (!ErrorStr.empty()) { errs() << argv[0] << ": Unable to write output '" << OutputFilename << "': " << ErrorStr << '\n'; diff --git a/utils/TableGen/TableGen.cpp b/utils/TableGen/TableGen.cpp index 3e284f9..c6d7502 100644 --- a/utils/TableGen/TableGen.cpp +++ b/utils/TableGen/TableGen.cpp @@ -171,8 +171,7 @@ int main(int argc, char **argv) { raw_ostream *Out = &outs(); if (OutputFilename != "-") { std::string Error; - Out = new raw_fd_ostream(OutputFilename.c_str(), Error, - raw_fd_ostream::F_Force); + Out = new raw_fd_ostream(OutputFilename.c_str(), Error); if (!Error.empty()) { errs() << argv[0] << ": error opening " << OutputFilename |