[PATCH] D65536: [ConstExprPreter] Overflow-detecting methods use GCC or clang builtins
JF Bastien via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 31 13:46:07 PDT 2019
jfb accepted this revision.
jfb added inline comments.
This revision is now accepted and ready to land.
================
Comment at: llvm/include/llvm/Support/MathExtras.h:863
AddOverflow(T X, T Y, T &Result) {
+#if __has_builtin(__builtin_add_overflow) || LLVM_GNUC_PREREQ(4, 0, 0)
+ return __builtin_add_overflow(X, Y, &Result);
----------------
The current minimum GCC version is 4.8, with 5.1 on the horizon. You therefore don't need the check :)
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D65536/new/
https://reviews.llvm.org/D65536
More information about the llvm-commits
mailing list