Commit Graph

8 Commits

Author SHA1 Message Date
Michael Gottesman
7e70389b80 [upstream-update] Do not specify OpenFlags since it was removed upstream.
This was removed upstream in https://reviews.llvm.org/D47789 since the only
place this flag was used was in the windows implementation where the behavior
triggered by this could be hidden in the implementation instead of being an
argument. As such, this code doesn't compile on master-next.

Since this has an acceptable default argument given the current stable, we can
just fix this on master and everything will work.

rdar://42862352
2018-08-02 11:34:54 -07:00
Jordan Rose
1dd415ae68 Add a new helper, atomicallyWritingToFile, and use it
This replaces the use of a Clang utility function that was
inexplicably a non-static member function of CompilerInstance. It
would be nice to sink this all the way to LLVM and share the
implementation across both projects, but the Clang implementation does
a handful of things we don't need, and it's hard to justify including
them in an LLVM-level interface. (I stared at
llvm/Support/FileSystem.h for a long time before giving up.)

Anyway, Serialization and FrontendTool both get their atomic writes
now without depending on Clang, and without duplicating the
scaffolding around the Clang API. We should probably adopt this for
all our output files.

No functionality change.
2018-08-01 16:41:21 -07:00
Robert Widmann
0e58b7fd14 Plumbing for a Virtual File System
Adds the -vfsoverlay frontend option that enables the user to pass
VFS overlay YAML files to Swift. These files define a (potentially
many-layered) virtual mapping on which we predicate a VFS.

Switch all input-based memory buffer reads in the Frontend to the new
FileSystem-based approach.
2018-07-31 13:16:14 -07:00
practicalswift
6d1ae2a39c [gardening] 2016 → 2017 2017-01-06 16:41:22 +01:00
Michael Gottesman
1af1cbfb76 [gardening] Add a bunch of end namespace comments found by clang-tidy. 2016-12-06 19:22:52 -08:00
practicalswift
797b80765f [gardening] Use the correct base URL (https://swift.org) in references to the Swift website
Remove all references to the old non-TLS enabled base URL (http://swift.org)
2016-11-20 17:36:03 +01:00
Zach Panzarino
e3a4147ac9 Update copyright date 2015-12-31 23:28:40 +00:00
Jordan Rose
60c3154d95 Add swift::moveFileIfDifferent.
Equivalent to llvm::sys::fs::rename, except that if the destination file
exists and has the same contents as the source file, the source file is
simply deleted and the destination file is not touched.

Used in next commit.

Swift SVN r28041
2015-05-01 17:40:28 +00:00