[llvm] aad3113 - Partial revert of "Use std::foo_t rather than std::foo in LLVM." in googlebench
Jon Roelofs via llvm-commits
llvm-commits at lists.llvm.org
Mon May 3 07:50:35 PDT 2021
Author: Jon Roelofs
Date: 2021-05-03T07:49:30-07:00
New Revision: aad3113417369a16ef57291b46594a4e07014eae
URL: https://github.com/llvm/llvm-project/commit/aad3113417369a16ef57291b46594a4e07014eae
DIFF: https://github.com/llvm/llvm-project/commit/aad3113417369a16ef57291b46594a4e07014eae.diff
LOG: Partial revert of "Use std::foo_t rather than std::foo in LLVM." in googlebench
Since googlebench builds as c++11, the change there is incorrect and breaks the
googlebench build when the STL implementation is strict about std::enable_if_t
not being available in lesser c++ versions.
partial revert of: 1bd6123b781120c9190b9ba58b900cdcb718cdd1 (https://reviews.llvm.org/D74384)
Differential Revision: https://reviews.llvm.org/D101583
Added:
Modified:
llvm/utils/benchmark/src/sysinfo.cc
Removed:
################################################################################
diff --git a/llvm/utils/benchmark/src/sysinfo.cc b/llvm/utils/benchmark/src/sysinfo.cc
index 04254bbed365a..01dd8a0317b05 100644
--- a/llvm/utils/benchmark/src/sysinfo.cc
+++ b/llvm/utils/benchmark/src/sysinfo.cc
@@ -176,8 +176,9 @@ bool GetSysctl(std::string const& Name, std::string* Out) {
return true;
}
-template <class Tp, class = std::enable_if_t<std::is_integral<Tp>::value>>
-bool GetSysctl(std::string const &Name, Tp *Out) {
+template <class Tp,
+ class = typename std::enable_if<std::is_integral<Tp>::value>::type>
+bool GetSysctl(std::string const& Name, Tp* Out) {
*Out = 0;
auto Buff = GetSysctlImp(Name);
if (!Buff) return false;
More information about the llvm-commits
mailing list