about summary refs log tree commit diff
diff options
context:
space:
mode:
authorAbseil Team <absl-team@google.com>2017-11-07T12·53-0800
committerkatzdm <katzdm@google.com>2017-11-07T16·03-0500
commitee2e3f667fca30b2cc754d560052204090e2a402 (patch)
tree4bd839ef9bed849679a110f5b11ec4539fcf1c22
parent075cf62092b39b640798f70bf7d16b6c82ca2842 (diff)
Changes imported from Abseil "staging" branch:
  - 3eaa80f3372d679f9c7ecd7661971d7a4ee3766a Include implementation files in header. by Alex Strelnikov <strel@google.com>

GitOrigin-RevId: 3eaa80f3372d679f9c7ecd7661971d7a4ee3766a
Change-Id: Ib77722fc43798a7321443eced4eb9da2b7e40064
-rw-r--r--absl/numeric/BUILD.bazel6
-rw-r--r--absl/numeric/int128.h6
-rw-r--r--absl/numeric/int128_have_intrinsic.inc2
3 files changed, 12 insertions, 2 deletions
diff --git a/absl/numeric/BUILD.bazel b/absl/numeric/BUILD.bazel
index a86b8d8d4fd1..c118d013c958 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 ecd6b371f7ea..a2ca29a03ad9 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 bb6491e178ab..49bde0767870 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.