DirectoryWatcher-linux.cpp - add missing implicit MathExtras.h header dependency. NFCI.
Revert "ADT: Migrate users of AlignedCharArrayUnion to std::aligned_union_t, NFC"We determined that the MSVC implementation of std::aligned* isn't suitedto our needs. It doesn't support 16 byte al
Revert "ADT: Migrate users of AlignedCharArrayUnion to std::aligned_union_t, NFC"We determined that the MSVC implementation of std::aligned* isn't suitedto our needs. It doesn't support 16 byte alignment or higher, and itdoesn't really guarantee 8 byte alignment. Seehttps://github.com/microsoft/STL/issues/1533Also reverts "ADT: Change AlignedCharArrayUnion to an alias of std::aligned_union_t, NFC"Also reverts "ADT: Remove AlignedCharArrayUnion, NFC" to bring backAlignedCharArrayUnion.This reverts commit 4d8bf870a82765eb0d4fe53c82f796b957c05954.This reverts commit d10f9863a5ac1cb681af07719650c44b48f289ce.This reverts commit 4b5dc150b9862271720b3d56a3e723a55dd81838.
show more ...
ADT: Migrate users of AlignedCharArrayUnion to std::aligned_union_t, NFCPrepare to delete `AlignedCharArrayUnion` by migrating its users over to`std::aligned_union_t`.I will delete `AlignedCharA
ADT: Migrate users of AlignedCharArrayUnion to std::aligned_union_t, NFCPrepare to delete `AlignedCharArrayUnion` by migrating its users over to`std::aligned_union_t`.I will delete `AlignedCharArrayUnion` and its tests in a follow-upcommit so that it's easier to revert in isolation in case somedownstream wants to keep using it.Differential Revision: https://reviews.llvm.org/D92516
[Clang] Migrate llvm::make_unique to std::make_uniqueNow that we've moved to C++14, we no longer need the llvm::make_uniqueimplementation from STLExtras.h. This patch is a mechanical replacemento
[Clang] Migrate llvm::make_unique to std::make_uniqueNow that we've moved to C++14, we no longer need the llvm::make_uniqueimplementation from STLExtras.h. This patch is a mechanical replacementof (hopefully) all the llvm::make_unique instances across the monorepo.Differential revision: https://reviews.llvm.org/D66259llvm-svn: 368942
Remove LLVM mutexes from clang in favor of std::mutexNone of those need to be recursive mutexes. No functionality changeintended.llvm-svn: 368173
[clang][DirectoryWatcher][NFC] Swapping asserts for llvm fatal_error in createI also have replaced all the instances of"auto DW = DirectoryWatcher::create" withllvm::Expected<std::unique_ptr<Dire
[clang][DirectoryWatcher][NFC] Swapping asserts for llvm fatal_error in createI also have replaced all the instances of"auto DW = DirectoryWatcher::create" withllvm::Expected<std::unique_ptr<DirectoryWatcher>> DW = DirectoryWatcher::createto make it more clear that DirectoryWatcher::create is returning an Expected.I've also allowed for logAllUnhandledErrors to consume errors in the case wereDirectoryWatcher::create produces them.Differential Revision: https://reviews.llvm.org/D65829llvm-svn: 368108
[clang][DirectoryWatcher] Adding llvm::Expected error handling to create.Prior to this patch Unix style errno error reporting from the inotify layer wasused by DirectoryWatcher::create to simply r
[clang][DirectoryWatcher] Adding llvm::Expected error handling to create.Prior to this patch Unix style errno error reporting from the inotify layer wasused by DirectoryWatcher::create to simply return a nullptr on error. Thiswould generally be ok, except that in LLVM we have much more robust errorreporting through the facilities of llvm::Expected.The other critical thing I stumbled across was that the unit tests forDirectoryWatcher were not failing abruptly when inotify_init() was reporting anerror, but would continue with the testing and eventually hit a deadlock in apathological machine state (ie in the unit test, the return nullptr on ::createwas ignored).Generally this pathological state never happens on any build bot, so it istotally understandable that it was overlooked, but on a Linux desktop runninga dubious desktop environment (which I will not name) there is a chance thatsaid desktop environment could use up enough inotify instances to exceed theuser's limit. These are the conditions that led me to hit the deadlock I amaddressing in this patch with more robust error handling.With the new llvm::Expected error handling when your system runs out of inotifyinstances for your user, the unit test will be forced to handle the error orcrash and report the issue to the user instead of weirdly deadlocking on acondition variable wait.Differential Revision: https://reviews.llvm.org/D65704llvm-svn: 367979
[DirectoryWatcher][linux] Fix build for older kernelsApparently kernel support for IN_EXCL_UNLINK in inotify_add_watch() doesn't imply it's defined in sys/inotify.h.https://bugs.llvm.org/show_bug
[DirectoryWatcher][linux] Fix build for older kernelsApparently kernel support for IN_EXCL_UNLINK in inotify_add_watch() doesn't imply it's defined in sys/inotify.h.https://bugs.llvm.org/show_bug.cgi?id=42824llvm-svn: 367906
Fix Linux buildr367274 broke itllvm-svn: 367276
[NFC] avoid AlignedCharArray in clangAs discussed in D65249, don't use AlignedCharArray or std::aligned_storage. Just use alignas(X) char Buf[Size];. This will allow me to remove AlignedCharArray e
[NFC] avoid AlignedCharArray in clangAs discussed in D65249, don't use AlignedCharArray or std::aligned_storage. Just use alignas(X) char Buf[Size];. This will allow me to remove AlignedCharArray entirely, and works on the current minimum version of Visual Studio.llvm-svn: 367274
[DirectoryWatcher][linux] Fix for older kernelsIN_EXCL_UNLINK exists since Linux 2.6.36Differential Revision: https://reviews.llvm.org/D64764llvm-svn: 366152
[DirectoryWatcher][NFC] Silence warnings in release buildllvm-svn: 365968
[DirectoryWatcher][linux] Fix use of uninitialized valuellvm-svn: 365966
Reland [clang] DirectoryWatcherThis reverts commit f561227d133224d2d6a5a016abe4be051fa75501.- DirectoryWatcher- Fix the build for platforms that don't have DW implementated.- Fix the threading
Reland [clang] DirectoryWatcherThis reverts commit f561227d133224d2d6a5a016abe4be051fa75501.- DirectoryWatcher- Fix the build for platforms that don't have DW implementated.- Fix the threading dependencies (thanks to compnerd).llvm-svn: 365954
Revert "Reland [clang] DirectoryWatcher"This reverts commit fdcb7f47e783933e0af8a5fae91132269a208268.llvm-svn: 365948
Reland [clang] DirectoryWatcherThis reverts commit abce8c457dd3de6b156756e547cc0eefb7653c79.+ Fix the build for platforms that don't have DW implementated.llvm-svn: 365947
Revert [clang] DirectoryWatcherThis reverts r365574 (git commit 31babea94a3ed38a140540f2252cf043dacec1f7)llvm-svn: 365581
[clang] DirectoryWatcherAsynchronously monitors specified directory for changes and passes notifications to provided callback.Dependency for index-while-building.Differential Revision: https://
[clang] DirectoryWatcherAsynchronously monitors specified directory for changes and passes notifications to provided callback.Dependency for index-while-building.Differential Revision: https://reviews.llvm.org/D58418llvm-svn: 365574