diff options
author | brainbreaker <gautamprajapati06@gmail.com> | 2017-06-20 15:14:32 +0530 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2017-06-21 10:12:36 +0200 |
commit | 2149d4a88e9dc88c30e7475f8ea317e5c7b78529 (patch) | |
tree | fbd4d172889cfb8c61ec4cf586ce8c3c49627285 | |
parent | 67ef8e99e87b6263334d01f37487d1d385b30b9b (diff) |
android:update safeint header to use the else implementation with clang
Clang toolchain does not defines the __builtin_mul_overflow for 32-bit
ARM. So, fallback to else implementation of checked_multiply when
building Android with Clang
Change-Id: I6120606f521ce121541a5b7f1150229258012d55
Reviewed-on: https://gerrit.libreoffice.org/39005
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
-rw-r--r-- | include/o3tl/safeint.hxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/o3tl/safeint.hxx b/include/o3tl/safeint.hxx index ce144d22d9ea..80a152b83290 100644 --- a/include/o3tl/safeint.hxx +++ b/include/o3tl/safeint.hxx @@ -29,7 +29,7 @@ template<typename T> inline bool checked_multiply(T a, T b, T& result) return !msl::utilities::SafeMultiply(a, b, result); } -#elif (defined __GNUC__ && __GNUC__ >= 5) || (__has_builtin(__builtin_mul_overflow)) +#elif (defined __GNUC__ && __GNUC__ >= 5) || (__has_builtin(__builtin_mul_overflow) && !(defined ANDROID && defined __clang__)) template<typename T> inline bool checked_multiply(T a, T b, T& result) { |