Skip to content

Commit 161bdb2

Browse files
committed
integrated EASTL into the libcxx headers
1 parent f0a3288 commit 161bdb2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+671
-111
lines changed

.gitmodules

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@
2020
url = https://github.com/CE-Programming/graphx-template
2121
[submodule "src/EASTL"]
2222
path = src/ea/EASTL
23-
url = https://github.com/electronicarts/EASTL.git
23+
url = https://github.com/CE-Programming/EASTL.git
24+
branch = eastl-tice
2425
[submodule "src/EABase"]
2526
path = src/ea/EABase
26-
url = https://github.com/electronicarts/EABase.git
27+
url = https://github.com/CE-Programming/EABase.git
28+
branch = eastl-tice

src/ea/EASTL

src/ea/include/__EASTL_user_config.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44

55
#define EASTL_THREAD_SUPPORT_AVAILABLE 0
6+
#define EASTL_EASTDC_VSNPRINTF 0
67

78

89
#if !defined(_SSIZE_T_) && !defined(_SSIZE_T_DEFINED) && !defined(SSIZE_T_DEFINED)

src/libcxx/header_test.cpp

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,21 @@
11
#include <__config>
22
#include <algorithm>
3+
#include <any>
4+
#include <array>
35
#include <bit>
6+
#include <bitset>
47
#include <cassert>
58
#include <ccomplex>
69
#include <cctype>
710
#include <cerrno>
811
#include <cfenv>
912
#include <cfloat>
13+
#include <chrono>
1014
#include <cinttypes>
1115
#include <ciso646>
1216
#include <climits>
1317
#include <cmath>
18+
#include <compare>
1419
#include <complex>
1520
#if __cplusplus >= 201907L
1621
#include <concepts>
@@ -24,23 +29,44 @@
2429
#include <cstdio>
2530
#include <cstdlib>
2631
#include <cstring>
27-
#include <ctime>
2832
#include <ctgmath>
33+
#include <ctime>
2934
#include <cwchar>
3035
#include <cwctype>
3136
#include <cxxabi.h>
37+
#include <deque>
3238
#include <exception>
39+
#include <expected>
40+
#include <functional>
3341
#include <initializer_list>
42+
#include <iterator>
3443
#include <limits>
44+
#include <list>
45+
#include <map>
3546
#include <memory>
3647
#include <new>
3748
#include <numbers>
49+
#include <numeric>
50+
#include <optional>
51+
#include <queue>
52+
#include <random>
53+
#include <ratio>
54+
#include <set>
3855
#if __cplusplus >= 201907L
3956
#include <source_location>
4057
#endif // __cplusplus >= 201907L
58+
#include <span>
59+
#include <stack>
60+
#include <string>
61+
#include <string_view>
62+
#include <tuple>
4163
#include <type_traits>
4264
#include <typeinfo>
65+
#include <unordered_map>
66+
#include <unordered_set>
4367
#include <utility>
68+
#include <variant>
69+
#include <vector>
4470
#include <version>
4571

4672
#include <alloca.h>

src/libcxx/include/__eastl_config

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#ifndef _EZCXX_EASTL_CONFIG
2+
#define _EZCXX_EASTL_CONFIG
3+
4+
#include <__config>
5+
6+
#pragma clang system_header
7+
8+
namespace eastl {
9+
10+
}
11+
12+
namespace std {
13+
using namespace eastl;
14+
}
15+
16+
#endif /* _EZCXX_EASTL_CONFIG */

src/libcxx/include/algorithm

Lines changed: 4 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -1,64 +1,13 @@
11
// -*- C++ -*-
2-
//===----------------------------------------------------------------------===//
3-
//
4-
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
5-
// See https://llvm.org/LICENSE.txt for license information.
6-
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7-
//
8-
//===----------------------------------------------------------------------===//
9-
102
#ifndef _EZCXX_ALGORITHM
113
#define _EZCXX_ALGORITHM
124

13-
#include <__config>
14-
15-
// currently unused, but included in the standard
5+
#include <__eastl_config>
166
#include <initializer_list>
7+
#include <EASTL/algorithm.h>
8+
#include <EASTL/heap.h>
9+
#include <EASTL/sort.h>
1710

1811
#pragma clang system_header
1912

20-
// very limited implementation of <algorithm>
21-
// only supports std:max, std::min, and std::clamp
22-
// these functions can be replaced when <algorithm> is properly implemented
23-
24-
namespace std {
25-
26-
template <class _Tp, class _Compare> _EZCXX_NODISCARD_EXT inline constexpr
27-
const _Tp& max(const _Tp& __a, const _Tp& __b, _Compare __comp)
28-
{
29-
return __comp(__a, __b) ? __b : __a;
30-
}
31-
32-
template <class _Tp> _EZCXX_NODISCARD_EXT inline constexpr
33-
const _Tp& max(const _Tp& __a, const _Tp& __b)
34-
{
35-
return (__a < __b) ? __b : __a;
36-
}
37-
38-
template <class _Tp, class _Compare> _EZCXX_NODISCARD_EXT inline constexpr
39-
const _Tp& min(const _Tp& __a, const _Tp& __b, _Compare __comp)
40-
{
41-
return __comp(__a, __b) ? __a : __b;
42-
}
43-
44-
template <class _Tp> _EZCXX_NODISCARD_EXT inline constexpr
45-
const _Tp& min(const _Tp& __a, const _Tp& __b)
46-
{
47-
return (__a < __b) ? __a : __b;
48-
}
49-
50-
template <class _Tp, class _Compare> _EZCXX_NODISCARD_EXT inline constexpr
51-
const _Tp& clamp(const _Tp& __v, const _Tp& __lo, const _Tp& __hi, _Compare __comp)
52-
{
53-
return __comp(__v, __lo) ? __lo : __comp(__hi, __v) ? __hi : __v;
54-
}
55-
56-
template <class _Tp> _EZCXX_NODISCARD_EXT inline constexpr
57-
const _Tp& clamp(const _Tp& __v, const _Tp& __lo, const _Tp& __hi)
58-
{
59-
return (__v < __lo) ? __lo : (__hi < __v) ? __hi : __v;
60-
}
61-
62-
} // namespace std
63-
6413
#endif // _EZCXX_ALGORITHM

src/libcxx/include/any

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
// -*- C++ -*-
2+
#ifndef _EZCXX_ANY
3+
#define _EZCXX_ANY
4+
5+
#include <__eastl_config>
6+
#include <algorithm>
7+
#include <EASTL/any.h>
8+
9+
#pragma clang system_header
10+
11+
#endif // _EZCXX_ANY

src/libcxx/include/array

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
// -*- C++ -*-
2+
#ifndef _EZCXX_ARRAY
3+
#define _EZCXX_ARRAY
4+
5+
#include <__eastl_config>
6+
#include <initializer_list>
7+
#include <EASTL/array.h>
8+
9+
#pragma clang system_header
10+
11+
#endif // _EZCXX_ARRAY

src/libcxx/include/bitset

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
// -*- C++ -*-
2+
#ifndef _EZCXX_BITSET
3+
#define _EZCXX_BITSET
4+
5+
#include <__eastl_config>
6+
#include <string>
7+
#include <EASTL/bitset.h>
8+
9+
#pragma clang system_header
10+
11+
#endif // _EZCXX_BITSET

src/libcxx/include/chrono

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
// -*- C++ -*-
2+
#ifndef _EZCXX_CHRONO
3+
#define _EZCXX_CHRONO
4+
5+
#include <__eastl_config>
6+
#include <EASTL/chrono.h>
7+
8+
#pragma clang system_header
9+
10+
#endif // _EZCXX_CHRONO

0 commit comments

Comments
 (0)