[ADT] Simplify getAsInteger and consumeInteger (NFC)
authorKazu Hirata <kazu@google.com>
Sat, 15 Oct 2022 21:08:01 +0000 (14:08 -0700)
committerKazu Hirata <kazu@google.com>
Sat, 15 Oct 2022 21:08:02 +0000 (14:08 -0700)
commitbfb0b6f48db15e2e6d7c40edae7c8b4bc95c07fb
tree71a08000beb4cb17795abc68999d615a58b529cd
parentccd89be64567697d6d09a3a74e08eab81080d567
[ADT] Simplify getAsInteger and consumeInteger (NFC)

This patch replaces the std::enable_if_t trick with a "constexpr if"
so that the resulting code looks more like "normal" C++ code.

Differential Revision: https://reviews.llvm.org/D136024
llvm/include/llvm/ADT/StringRef.h