Add missing newlines at EOF; NFC
[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
show more ...
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