[all-commits] [llvm/llvm-project] f51bc4: [Support] Add file lock/unlock functions

Serge Pavlov via All-commits all-commits at lists.llvm.org
Tue Jun 2 22:23:59 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: f51bc4fb60fbcef26d18eff549fc68307fd46489
      https://github.com/llvm/llvm-project/commit/f51bc4fb60fbcef26d18eff549fc68307fd46489
  Author: Serge Pavlov <sepavloff at gmail.com>
  Date:   2020-06-03 (Wed, 03 Jun 2020)

  Changed paths:
    M llvm/include/llvm/Support/FileSystem.h
    M llvm/lib/Support/Unix/Path.inc
    M llvm/lib/Support/Windows/Path.inc
    M llvm/unittests/Support/Path.cpp

  Log Message:
  -----------
  [Support] Add file lock/unlock functions

New functions `lockFile`, `tryLockFile` and `unlockFile` implement
simple file locking. They lock or unlock entire file. This must be
enough to support simulataneous writes to log files in parallel builds.

Differential Revision: https://reviews.llvm.org/D78896




More information about the All-commits mailing list