Make LLVM command-line tools overwrite their output files without -f.
authorDan Gohman <gohman@apple.com>
Tue, 25 Aug 2009 15:34:52 +0000 (15:34 +0000)
committerDan Gohman <gohman@apple.com>
Tue, 25 Aug 2009 15:34:52 +0000 (15:34 +0000)
commitbaa26395ccf17fc988bb9cf62d6659ca8415ece9
treeaf3d61a2611ae0c26bb7d9b8ac261976592ec108
parentcf48efcf3dc6c825a113448105763fab9de9aa53
Make LLVM command-line tools overwrite their output files without -f.
This is conventional command-line tool behavior. -f now just means
"enable binary output on terminals".

Add a -f option to llvm-extract and llvm-link, for consistency.

Remove F_Force from raw_fd_ostream and enable overwriting and
truncating by default. Introduce an F_Excl flag to permit users to
enable a failure when the file already exists. This flag is
currently unused.

Update Makefiles and documentation accordingly.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79990 91177308-0d34-0410-b5e6-96231b3b80d8
22 files changed:
examples/BrainF/BrainFDriver.cpp
include/llvm/Support/GraphWriter.h
include/llvm/Support/raw_ostream.h
lib/Analysis/CFGPrinter.cpp
lib/Bitcode/Writer/BitWriter.cpp
lib/Support/raw_ostream.cpp
tools/bugpoint/ExtractFunction.cpp
tools/bugpoint/OptimizerDriver.cpp
tools/bugpoint/ToolRunner.cpp
tools/gold/gold-plugin.cpp
tools/llc/llc.cpp
tools/llvm-as/llvm-as.cpp
tools/llvm-dis/llvm-dis.cpp
tools/llvm-extract/llvm-extract.cpp
tools/llvm-ld/llvm-ld.cpp
tools/llvm-link/llvm-link.cpp
tools/llvm-mc/llvm-mc.cpp
tools/lto/LTOCodeGenerator.cpp
tools/opt/GraphPrinters.cpp
tools/opt/opt.cpp
utils/FileUpdate/FileUpdate.cpp
utils/TableGen/TableGen.cpp