[llvm] 285da1c - [llvm] Use std::is_integral_v (NFC)
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 14 00:31:11 PST 2022
Author: Kazu Hirata
Date: 2022-11-14T00:31:06-08:00
New Revision: 285da1c8cdb2e903372f8f3e3b79eb4d0bac7437
URL: https://github.com/llvm/llvm-project/commit/285da1c8cdb2e903372f8f3e3b79eb4d0bac7437
DIFF: https://github.com/llvm/llvm-project/commit/285da1c8cdb2e903372f8f3e3b79eb4d0bac7437.diff
LOG: [llvm] Use std::is_integral_v (NFC)
Added:
Modified:
llvm/include/llvm/ADT/MapVector.h
llvm/include/llvm/Support/BinaryStreamReader.h
llvm/include/llvm/Support/BinaryStreamWriter.h
Removed:
################################################################################
diff --git a/llvm/include/llvm/ADT/MapVector.h b/llvm/include/llvm/ADT/MapVector.h
index c4e5c7e2bac51..27232c256d166 100644
--- a/llvm/include/llvm/ADT/MapVector.h
+++ b/llvm/include/llvm/ADT/MapVector.h
@@ -39,7 +39,7 @@ class MapVector {
VectorType Vector;
static_assert(
- std::is_integral<typename MapType::mapped_type>::value,
+ std::is_integral_v<typename MapType::mapped_type>,
"The mapped_type of the specified Map must be an integral type");
public:
diff --git a/llvm/include/llvm/Support/BinaryStreamReader.h b/llvm/include/llvm/Support/BinaryStreamReader.h
index 6853df3ccab18..056d2a5036d6a 100644
--- a/llvm/include/llvm/Support/BinaryStreamReader.h
+++ b/llvm/include/llvm/Support/BinaryStreamReader.h
@@ -66,7 +66,7 @@ class BinaryStreamReader {
/// \returns a success error code if the data was successfully read, otherwise
/// returns an appropriate error code.
template <typename T> Error readInteger(T &Dest) {
- static_assert(std::is_integral<T>::value,
+ static_assert(std::is_integral_v<T>,
"Cannot call readInteger with non-integral value!");
ArrayRef<uint8_t> Bytes;
diff --git a/llvm/include/llvm/Support/BinaryStreamWriter.h b/llvm/include/llvm/Support/BinaryStreamWriter.h
index ce7af3650f529..d3d5edbf69e52 100644
--- a/llvm/include/llvm/Support/BinaryStreamWriter.h
+++ b/llvm/include/llvm/Support/BinaryStreamWriter.h
@@ -56,7 +56,7 @@ class BinaryStreamWriter {
/// \returns a success error code if the data was successfully written,
/// otherwise returns an appropriate error code.
template <typename T> Error writeInteger(T Value) {
- static_assert(std::is_integral<T>::value,
+ static_assert(std::is_integral_v<T>,
"Cannot call writeInteger with non-integral value!");
uint8_t Buffer[sizeof(T)];
llvm::support::endian::write<T, llvm::support::unaligned>(
More information about the llvm-commits
mailing list