Skip to content

Commit 0e754e1

Browse files
committed
Migrate away from C++20-deprecated POD type traits
1 parent 881194d commit 0e754e1

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

llvm/include/llvm/Demangle/ItaniumDemangle.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,18 +27,18 @@
2727
#include <cstring>
2828
#include <limits>
2929
#include <new>
30+
#include <type_traits>
3031
#include <utility>
3132

3233
DEMANGLE_NAMESPACE_BEGIN
3334

3435
template <class T, size_t N> class PODSmallVector {
35-
static_assert(std::is_pod<T>::value,
36-
"T is required to be a plain old data type");
36+
static_assert(std::is_trivial_v<T>, "T is required to be a trivial type");
3737

3838
T *First = nullptr;
3939
T *Last = nullptr;
4040
T *Cap = nullptr;
41-
T Inline[N] = {0};
41+
T Inline[N] = {};
4242

4343
bool isInline() const { return First == Inline; }
4444

llvm/tools/llvm-exegesis/lib/Target.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ std::unique_ptr<BenchmarkRunner> ExegesisTarget::createUopsBenchmarkRunner(
134134
return std::make_unique<UopsBenchmarkRunner>(State, BenchmarkPhaseSelector);
135135
}
136136

137-
static_assert(std::is_pod<PfmCountersInfo>::value,
137+
static_assert(std::is_trivial_v<PfmCountersInfo>,
138138
"We shouldn't have dynamic initialization here");
139139
const PfmCountersInfo PfmCountersInfo::Default = {nullptr, nullptr, nullptr,
140140
0u};

0 commit comments

Comments
 (0)