Skip to content

Commit

Permalink
Migrate away from C++20-deprecated POD type traits
Browse files Browse the repository at this point in the history
  • Loading branch information
dwblaikie committed Jan 26, 2023
1 parent 881194d commit 0e754e1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions llvm/include/llvm/Demangle/ItaniumDemangle.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,18 +27,18 @@
#include <cstring>
#include <limits>
#include <new>
#include <type_traits>
#include <utility>

DEMANGLE_NAMESPACE_BEGIN

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

T *First = nullptr;
T *Last = nullptr;
T *Cap = nullptr;
T Inline[N] = {0};
T Inline[N] = {};

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

Expand Down
2 changes: 1 addition & 1 deletion llvm/tools/llvm-exegesis/lib/Target.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ std::unique_ptr<BenchmarkRunner> ExegesisTarget::createUopsBenchmarkRunner(
return std::make_unique<UopsBenchmarkRunner>(State, BenchmarkPhaseSelector);
}

static_assert(std::is_pod<PfmCountersInfo>::value,
static_assert(std::is_trivial_v<PfmCountersInfo>,
"We shouldn't have dynamic initialization here");
const PfmCountersInfo PfmCountersInfo::Default = {nullptr, nullptr, nullptr,
0u};
Expand Down

0 comments on commit 0e754e1

Please sign in to comment.