Commit Graph

66 Commits

Author SHA1 Message Date
Pavel Labath
ed00beba12 Revert "Delete the remainder of platform specific code in FileSpec."
This reverts commit r298465 as it breaks
TestLLVM.TestHomeDirectory.test_tilde_home_directory.

llvm-svn: 298509
2017-03-22 14:04:43 +00:00
Zachary Turner
aaedf89101 Delete the remainder of platform specific code in FileSpec.
Differential Revision: https://reviews.llvm.org/D31129

llvm-svn: 298465
2017-03-22 00:27:24 +00:00
Zachary Turner
6f9e690199 Move Log from Core -> Utility.
All references to Host and Core have been removed, so this
class can now safely be lowered into Utility.

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

llvm-svn: 296909
2017-03-03 20:56:28 +00:00
Pavel Labath
c4a3395103 Fix a couple of corner cases in NameMatches
Summary:
I originally set out to move the NameMatches closer to the relevant
function and add some unit tests. However, in the process I've found a
couple of bugs in the implementation:
- the early exits where not always correct:
  - (test==pattern) does not mean the match will always suceed because
    of regular expressions
  - pattern.empty() does not mean the match will fail because the "" is
    a valid prefix of any string

So I cleaned up those and added some tests. The only tricky part here
was that regcomp() implementation on darwin did not recognise the empty
string as a regular expression and returned an REG_EMPTY error instead.
The simples fix here seemed to be to replace the empty expression with
an equivalent non-empty one.

Reviewers: clayborg, zturner

Subscribers: mgorny, lldb-commits

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

llvm-svn: 295651
2017-02-20 11:35:33 +00:00
Pavel Labath
a272fa8fff Fix breakage caused by r295368
Also move the ErrorTest into the Utility package, to follow the class it
is testing.

llvm-svn: 295436
2017-02-17 10:19:46 +00:00
Zachary Turner
24ae6294a4 Finish breaking the dependency from Utility.
Differential Revision: https://reviews.llvm.org/D29964

llvm-svn: 295368
2017-02-16 19:38:21 +00:00
Zachary Turner
01c3243fc1 Remove dependencies from Utility to Core and Target.
With this patch, the only dependency left is from Utility
to Host.  After this is broken, Utility will finally be
standalone.

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

llvm-svn: 295088
2017-02-14 19:06:07 +00:00
Pavel Labath
3b7e1981b2 Remove LIBLLDB_LOG_VERBOSE category
Summary:
Per discussion in D28616, having two ways two request logging (log
enable lldb XXX verbose && log enable -v lldb XXX) is confusing. This
removes the first option and standardizes all code to use the second
one.

I've added a LLDB_LOGV macro as a shorthand for if(log &&
log->GetVerbose()) and switched most of the affected log statements to
use that (I've only left a couple of cases that were doing complex
computations in an if(log) block).

Reviewers: jingham, zturner

Subscribers: lldb-commits

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

llvm-svn: 294113
2017-02-05 00:44:54 +00:00
Chris Bieneman
1751311a87 [CMake] Update unit tests with accurate dependencies
This is extending the updates from r293696 to the LLDB unit tests.

llvm-svn: 293821
2017-02-01 22:17:00 +00:00
Pavel Labath
c4063eee0d Introduce chrono to the Communication class
This replaces the raw integer timeout parameters in the class with their
chrono-based equivalents.  To achieve this, I have moved the Timeout class to a
more generic place and added a quick unit test for it.

llvm-svn: 287920
2016-11-25 11:58:44 +00:00
Pavel Labath
df2ad4c531 Add unit tests for ModuleCache
Reviewers: ovyalov, zturner

Subscribers: lldb-commits

Differential Revision: http://reviews.llvm.org/D20570

llvm-svn: 270684
2016-05-25 10:48:16 +00:00
Tamas Berghammer
ccb367609b Add a new task pool class to LLDB
The purpose of the class is to make it easy to execute tasks in parallel

Basic design goals:
* Have a very lightweight and easy to use interface where a list of
  lambdas can be executed in parallel
* Use a global thread pool to limit the number of threads used
  (std::async don't do it on Linux) and to eliminate the thread creation
  overhead
* Destroy the thread currently not in use to avoid the confusion caused
  by them during debugging LLDB

Possible future improvements:
* Possibility to cancel already added, but not yet started tasks
* Parallel for_each implementation
* Optimizations in the thread creation destroyation code

Differential revision: http://reviews.llvm.org/D13727

llvm-svn: 250820
2015-10-20 12:42:05 +00:00
Zachary Turner
799770c03a Fix linking of unit tests via CMake on Windows.
A previous attempt to make the unit tests link properly on
Linux broke it for Windows.  This patch fixes it for both platforms.

llvm-svn: 232648
2015-03-18 16:56:24 +00:00
Zachary Turner
85bc48ca74 Convert CRLF to LF.
I accidentally let some Windows line endings slip in.  This is a
good reminder for me to use core.eol=lf.

llvm-svn: 232560
2015-03-17 22:51:21 +00:00
David Blaikie
3dfb86b641 Fix the clang -Werror build & make the unit tests link under Linux
The order of libraries passed to the linker didn't work under linux (you
need the llvm libraries first, then the lldb libraries). I modelled this
after clang's setup here. Seemed simple enough to just be consistent.

llvm-svn: 232461
2015-03-17 03:32:21 +00:00
Zachary Turner
719ec93a74 Rework the gtest directory structure.
This makes the directory structure mirror the canonical LLVM
directory structure for a gtest suite.

Additionally, this patch deletes the xcode project.  Nobody
is currently depending on this, and it would be better to have
gtest unit tests be hand-maintained in the Xcode workspace
rather than using this python test runner.  Patches to that
effect will be submitted as followups.

llvm-svn: 232211
2015-03-13 20:54:57 +00:00