llvm-project/llvm/lib/Support/Unix
Duncan P. N. Exon Smith 0d5b6423ba Support: Reduce stats in fs::copy_file on Darwin
fs::copy_file() on Darwin has a nice optimization to clone the file when
possible. Change the implementation to use clonefile() directly, instead
of the higher-level copyfile().  The latter does the wrong thing for
symlinks, which requires calling `stat` first...

With that out of the way, optimistically call clonefile() all the time,
and then for any error that's recoverable try again with copyfile()
(without the COPYFILE_CLONE flag, as before).

Differential Revision: https://reviews.llvm.org/D112250
2021-10-29 16:48:35 -07:00
..
COM.inc
DynamicLibrary.inc
Host.inc
Memory.inc [Support][mips] Remove unnecessary includes from Memory.inc 2021-10-13 07:48:36 +03:00
Path.inc Support: Reduce stats in fs::copy_file on Darwin 2021-10-29 16:48:35 -07:00
Process.inc [llvm] Replace LLVM_ATTRIBUTE_NORETURN with C++11 [[noreturn]] 2021-07-28 09:31:14 -07:00
Program.inc [llvm] Use StringRef::contains (NFC) 2021-10-23 08:45:27 -07:00
README.txt
Signals.inc Add LLVM_ATTRIBUTE_USED to fix problems which could be exposed by aggressive global pointer variable removal 2021-04-26 13:31:37 -07:00
ThreadLocal.inc
Threading.inc [Support] reorder Threading includes to avoid conflict with FreeBSD headers 2021-07-09 10:39:52 +01:00
Unix.h [llvm] Unix.h - Replace report_fatal_error(std::string) with report_fatal_error(Twine) 2021-10-06 12:13:40 +01:00
Watchdog.inc

README.txt

llvm/lib/Support/Unix README
===========================

This directory provides implementations of the lib/System classes that
are common to two or more variants of UNIX. For example, the directory
structure underneath this directory could look like this:

Unix           - only code that is truly generic to all UNIX platforms
  Posix        - code that is specific to Posix variants of UNIX
  SUS          - code that is specific to the Single Unix Specification
  SysV         - code that is specific to System V variants of UNIX

As a rule, only those directories actually needing to be created should be
created. Also, further subdirectories could be created to reflect versions of
the various standards. For example, under SUS there could be v1, v2, and v3
subdirectories to reflect the three major versions of SUS.