diff options
author | Daniel Dunbar <daniel@zuster.org> | 2012-03-03 00:36:06 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2012-03-03 00:36:06 +0000 |
commit | e21dd284d8209a89137a03a0d63f2bd57be9e660 (patch) | |
tree | 40c28699f2ec9c01972ba07325ea4d6c86cd4dad /lib/Frontend/CompilerInstance.cpp | |
parent | 12f28ab8a53d7743081d607617309891fa8156f3 (diff) |
Frontend: Default to creating output files using temporary files + rename.
- This is a more reliable default, as it behaves better on failure and also
ensures that we create *new* files (instead of reusing existing inodes). This
is useful for other applications (like lldb) which want to cache inode's to
know when a file has been rewritten.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151961 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Frontend/CompilerInstance.cpp')
-rw-r--r-- | lib/Frontend/CompilerInstance.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Frontend/CompilerInstance.cpp b/lib/Frontend/CompilerInstance.cpp index a7855112e6..bf3e3a8908 100644 --- a/lib/Frontend/CompilerInstance.cpp +++ b/lib/Frontend/CompilerInstance.cpp @@ -470,7 +470,8 @@ CompilerInstance::createDefaultOutputFile(bool Binary, StringRef InFile, StringRef Extension) { return createOutputFile(getFrontendOpts().OutputFile, Binary, - /*RemoveFileOnSignal=*/true, InFile, Extension); + /*RemoveFileOnSignal=*/true, InFile, Extension, + /*UseTemporary=*/true); } llvm::raw_fd_ostream * |