diff options
Diffstat (limited to 'absl/numeric')
-rw-r--r-- | absl/numeric/BUILD.bazel | 6 | ||||
-rw-r--r-- | absl/numeric/int128.h | 6 | ||||
-rw-r--r-- | absl/numeric/int128_have_intrinsic.inc | 2 |
3 files changed, 12 insertions, 2 deletions
diff --git a/absl/numeric/BUILD.bazel b/absl/numeric/BUILD.bazel index a86b8d8d..c118d013 100644 --- a/absl/numeric/BUILD.bazel +++ b/absl/numeric/BUILD.bazel @@ -10,7 +10,11 @@ licenses(["notice"]) # Apache 2.0 cc_library( name = "int128", - srcs = ["int128.cc"], + srcs = [ + "int128.cc", + "int128_have_intrinsic.inc", + "int128_no_intrinsic.inc", + ], hdrs = ["int128.h"], copts = ABSL_DEFAULT_COPTS, deps = [ diff --git a/absl/numeric/int128.h b/absl/numeric/int128.h index ecd6b371..a2ca29a0 100644 --- a/absl/numeric/int128.h +++ b/absl/numeric/int128.h @@ -625,6 +625,12 @@ inline uint128& uint128::operator--() { return *this; } +#if defined(ABSL_HAVE_INTRINSIC_INT128) +#include "absl/numeric/int128_have_intrinsic.inc" +#else // ABSL_HAVE_INTRINSIC_INT128 +#include "absl/numeric/int128_no_intrinsic.inc" +#endif // ABSL_HAVE_INTRINSIC_INT128 + } // namespace absl #endif // ABSL_NUMERIC_INT128_H_ diff --git a/absl/numeric/int128_have_intrinsic.inc b/absl/numeric/int128_have_intrinsic.inc index bb6491e1..49bde076 100644 --- a/absl/numeric/int128_have_intrinsic.inc +++ b/absl/numeric/int128_have_intrinsic.inc @@ -1,3 +1,3 @@ // This file will contain :int128 implementation details that depend on internal // representation when ABSL_HAVE_INTRINSIC_INT128 is defined. This file will be -// included by int128.h.
\ No newline at end of file +// included by int128.h. |