[PATCH] D79066: [Support] Class to facilitate file locking

Serge Pavlov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 19 03:12:08 PDT 2020


sepavloff updated this revision to Diff 271983.
sepavloff added a comment.

New method names, fixed unit test

Review of D78903 <https://reviews.llvm.org/D78903> demonstrated that using the name `tryToLock` for
blocking operation is misleading. So the method name was changed
to `lock`. Attribute `LLVM_NODISCARD` should prevent from ignoring
return value.

Also due to the change of implementation of lock operation on POSIX
systems, existing unit test is no more valid as it uses locks per
handle inside the same process. This test however still can be run
on Windows, so it was adapted for changed interface.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D79066/new/

https://reviews.llvm.org/D79066

Files:
  llvm/include/llvm/Support/FileSystem.h
  llvm/include/llvm/Support/raw_ostream.h
  llvm/lib/Support/raw_ostream.cpp
  llvm/unittests/Support/Path.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D79066.271983.patch
Type: text/x-patch
Size: 6101 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200619/7275ac78/attachment.bin>


More information about the llvm-commits mailing list