784 Commits

Author SHA1 Message Date
Peter Johnson
39670fc9c0 libuv: Add pragmas for win32 libraries. 2018-06-24 10:31:55 -07:00
Peter Johnson
6f0d50b9cb libuv: Avoid conditional-true compiler warning.
Instead use a preprocessor macro to comment out the code as necessary.
2018-06-24 10:31:55 -07:00
Peter Johnson
873b2ed13c libuv: Add missing casts. 2018-06-24 10:31:55 -07:00
Peter Johnson
321c144d21 libuv: Remove extern "C" from uv.h.
This results in name-mangling of the uv symbols and thereby avoids potential
symbol conflicts with system libuv installations.
2018-06-24 10:31:55 -07:00
Peter Johnson
13e1af259c libuv: Remove MSVC 2008 stdint from uv.h and uv-win.h. 2018-06-24 10:31:55 -07:00
Peter Johnson
9d7792ead0 libuv: Remove aix, os390, and sunos from uv-unix.h. 2018-06-24 10:31:55 -07:00
Peter Johnson
6d93d3c250 libuv: Rename source files from .c to .cpp.
This ensures they will actually get compiled as C++.
2018-06-24 10:31:55 -07:00
Peter Johnson
156822dbc8 Import libuv 1.21.0. 2018-06-24 10:31:55 -07:00
Peter Johnson
ea7d11b1db Twine: Make isNull() public. (#1162)
This makes it possible to pass "null" Twines and detect it in the callee.
2018-06-23 16:13:50 -07:00
Austin Shalit
e548a5f705 Update and enable PMD 6.3.0 (#1107) 2018-06-03 10:00:53 -07:00
Peter Johnson
6aebba5452 Import MapVector from LLVM. (#1128) 2018-06-03 08:39:14 -07:00
Tyler Veness
8c680a26f8 Moved C++ comments from source files to headers (#1111)
Also sorted functions in C++ sources to match order in related headers.
2018-05-31 20:47:15 -07:00
Thad House
307da3ad2d Simplify allocation of JNI global classes and exceptions (#1110)
Helps ensure they get freed properly (We have had a few cases before where this wasn't the case).
2018-05-29 15:44:16 -07:00
Austin Shalit
40cc743cc7 Enable checkstyle on cscore, ntcore, wpiutil (#1032)
Also update to version 8.10.
2018-05-24 00:31:04 -04:00
Peter Johnson
a2ecb1027a Update LLVM to latest upstream. (#1080)
Also change header guards to WPI header guards.
Remove StringRef::c_str() customization, replacing the handful of uses with Twine or SmallString.
TCPStream: Include errno.h and make Windows includes lowercase for consistency.

Upstream LLVM version: eb4186cca7924fb1706357545311a2fa3de40c59
2018-05-22 23:31:08 -07:00
Peter Johnson
7cd15aa049 Re-enable JsonIteratorObjectTest.KeyValue. 2018-05-15 22:31:35 -07:00
Peter Johnson
f8ed48af98 Update json from upstream version 3.1.2.
This adds support for ubjson and makes a number of bugfixes.

Binary input and output have switched from strings to uint8_t arrays.
2018-05-15 22:31:35 -07:00
Peter Johnson
c274d1790f StringRef: Add comparison operators against const char*. 2018-05-15 22:31:35 -07:00
Peter Johnson
6699f86361 Make most StringRef functions noexcept. 2018-05-15 22:31:35 -07:00
Peter Johnson
c2b1ed3edd ArrayRef: Add value_type typedef like std containers. 2018-05-15 22:31:35 -07:00
Peter Johnson
2c27ad073a raw_istream enhancements. 2018-05-15 22:31:35 -07:00
Peter Johnson
31bb55c319 Add std::vector and unsigned variants of raw_ostream. 2018-05-15 22:31:35 -07:00
Peter Johnson
dd4230d743 StringMap: Add decrement operations to iterator. 2018-05-15 22:31:35 -07:00
Tyler Veness
5ff3d837b6 Fix compilation with GCC 8 (#1051)
The anonymous namespace was renamed due to -Wsubobject-linkage complaining
about a field created in a GTest template class (CborRoundtripTestParam)
being defined in an anonymous namespace. See
https://stackoverflow.com/a/37723265.
2018-05-13 23:11:13 -07:00
Thad House
f07799c67b Disables unstable and failing unit tests (#1057) 2018-05-13 21:59:45 -07:00
Tyler Veness
6729a7d6b1 Run wpiformat on merged repo (#1021) 2018-05-13 17:09:56 -07:00
Peter Johnson
7a34f5d17d Check for nullptr return from malloc, calloc, and realloc. (#1023)
These are used in ntcore and cscore.  Add inline null-checking versions
to wpi/memory.h and use them throughout.
2018-05-04 17:55:46 -07:00
Peter Johnson
5c2c5ccd07 Remove atomic static shim. (#1020)
This was only useful for pre-VS2015 and was only being used in one place.
2018-05-04 02:07:27 -07:00
Thad House
954f8c40f5 Adds CMake Builds (#1015) 2018-05-02 21:15:30 -07:00
Peter Johnson
a28832e52f Add backwards compatibility shims for old wpiutil headers.
These generate a warning when included, then include the old header.

Note for GCC, #warning is used; this requires -std=gnu++14 instead of
-std=c++14 (otherwise the warning is treated as an error because #warning is
a GNU extension).  On MSVC, #pragma message is used, which is a bit
unsatisfactory as the message doesn't say where it was included from.

The llvm shim headers also include a llvm namespace shim.
2018-04-30 10:22:54 -07:00
Peter Johnson
f84018af5f Move entirety of llvm namespace to wpi namespace.
During shared library loading, a different libLLVM can be pulled in, causing
llvm symbols from dependent libraries to resolve to that library instead of
this one. This has been seen in the wild with the Mesa OpenGL implementation
in JavaFX applications (see wpilibsuite/shuffleboard#361).

This is clearly a very breaking change. For some level of backwards
compatibility, a namespace alias from llvm to wpi is performed in the "llvm"
headers.  Unfortunately, forward declarations of llvm classes will still break,
but compilers seem to generate clear error messages in those cases
("namespace alias 'llvm' not allowed here, assuming 'wpi'").

This change also moves all the wpiutil headers to a single "wpi" subdirectory
from the previously split "llvm", "support", "tcpsockets", and "udpsockets".
Shim headers will be added for backwards compatibility in a later commit.
2018-04-30 10:22:54 -07:00
Thad House
7f88cf768d New 2018 and later build setup (#1001) 2018-04-29 13:29:07 -07:00
Thad House
cb2c9eb6d5 Remove gmock and builds from utility libraries (#999) 2018-04-27 22:14:26 -07:00
Peter Johnson
0f947613a9 Prepare wpiutil for merge into allwpilib. 2018-04-27 19:56:51 -07:00