[llvm] 4153c2d - [ProfileData] Avoid deprecated is_pod
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Sat Dec 7 16:22:19 PST 2024
Author: Fangrui Song
Date: 2024-12-07T16:22:14-08:00
New Revision: 4153c2dc0537de926b786efebf1849f9986313ef
URL: https://github.com/llvm/llvm-project/commit/4153c2dc0537de926b786efebf1849f9986313ef
DIFF: https://github.com/llvm/llvm-project/commit/4153c2dc0537de926b786efebf1849f9986313ef.diff
LOG: [ProfileData] Avoid deprecated is_pod
Added:
Modified:
llvm/lib/ProfileData/MemProfReader.cpp
Removed:
################################################################################
diff --git a/llvm/lib/ProfileData/MemProfReader.cpp b/llvm/lib/ProfileData/MemProfReader.cpp
index 2cf0e9c74c0d23..e9c2474d7ba8fc 100644
--- a/llvm/lib/ProfileData/MemProfReader.cpp
+++ b/llvm/lib/ProfileData/MemProfReader.cpp
@@ -45,7 +45,7 @@ namespace llvm {
namespace memprof {
namespace {
template <class T = uint64_t> inline T alignedRead(const char *Ptr) {
- static_assert(std::is_pod<T>::value, "Not a pod type.");
+ static_assert(std::is_integral_v<T>, "Not an integral type");
assert(reinterpret_cast<size_t>(Ptr) % sizeof(T) == 0 && "Unaligned Read");
return *reinterpret_cast<const T *>(Ptr);
}
More information about the llvm-commits
mailing list