llvm-project/lldb/unittests
Pavel Labath 3879fe0099 Modernize and clean-up the Predicate class
Summary:
The comments on this class were out of date with the implementation, and
the implementation itself was inconsistent with our usage of the Timeout
class (I started converting everything to use this class back in D27136,
but I missed this one). I avoid duplicating the waiting logic by
introducing a templated WaitFor function, and make other functions
delegate to that. This function can be also used as a replacement for
the unused WaitForBitToBeSet functions I removed, if it turns out to be
necessary.

As this changes the meaning of a "zero" timeout, I tracked down all the
callers of these functions and updated them accordingly. Propagating the
changes to all the callers of RunShellCommand was a bit too much for
this patch, so I stopped there and will continue that in a follow-up
patch.

I also add some basic unittests for the functions I modified.

Reviewers: jingham, clayborg

Subscribers: mgorny, lldb-commits

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

llvm-svn: 331880
2018-05-09 14:29:30 +00:00
..
Breakpoint Rename Error -> Status. 2017-05-12 04:51:55 +00:00
Core Fix narrowing warning by appending `f` to literal constant. 2018-04-19 18:31:57 +00:00
Editline Move PseudoTerminal to the lldb_private namespace 2017-12-11 10:09:14 +00:00
Expression Rename Error -> Status. 2017-05-12 04:51:55 +00:00
Host Modernize and clean-up the Predicate class 2018-05-09 14:29:30 +00:00
Interpreter Move Args.cpp from Interpreter to Utility 2018-04-17 18:53:35 +00:00
Language More correct handling of error cases C++ name parser 2018-02-06 19:04:12 +00:00
ObjectFile Add a comment explaining how the input for GetModuleSpecifications_EarlySectionHeaders was generated 2018-02-05 18:03:02 +00:00
Platform [CMake] Update unit tests with accurate dependencies 2017-02-01 22:17:00 +00:00
Process Fix gdb-remote qMemoryRegionInfo unit tests for xml-enabled builds 2018-05-02 17:00:33 +00:00
ScriptInterpreter Added new API to SBStructuredData class 2017-05-29 08:25:46 +00:00
Signals Make LLDB skip server-client roundtrip for signals that don't require any actions 2017-03-07 21:34:40 +00:00
Symbol Fix memory leak in TestClangASTContext.TestRecordHasFields 2018-01-22 18:56:33 +00:00
SymbolFile Revert "[SymbolFilePDB] Fix null array access when parsing the type of a function without any arguments, i.e. 'int main()' and add support to test it" 2018-01-22 11:51:56 +00:00
Target Fix a compiler warning in ModuleCacheTest.cpp, NFC 2018-02-23 23:18:27 +00:00
TestingSupport cmake + xcode: prevent gtests from using includes from project root 2017-10-03 21:20:18 +00:00
UnwindAssembly [LLDB] Initial version of PPC64 InstEmulation 2018-02-27 18:42:46 +00:00
Utility Always normalize FileSpec paths. 2018-04-27 15:45:58 +00:00
debugserver [CMake] Need to set WITH_LOCKDOWN on debugserver target 2017-09-06 20:15:43 +00:00
tools llgs tests: Use noack-mode for communication to avoid pr37294 2018-04-30 14:30:02 +00:00
CMakeLists.txt [CMake] Use PRIVATE in target_link_libraries for executables 2017-12-05 21:49:56 +00:00
gtest_common.h [Windows] Remove the #include <eh.h> hack. 2017-03-03 20:21:59 +00:00