about summary refs log tree commit diff
path: root/absl/strings
diff options
context:
space:
mode:
Diffstat (limited to 'absl/strings')
-rw-r--r--absl/strings/BUILD.bazel5
-rw-r--r--absl/strings/CMakeLists.txt5
-rw-r--r--absl/strings/ascii.cc6
-rw-r--r--absl/strings/ascii.h7
-rw-r--r--absl/strings/internal/charconv_bigint.cc4
-rw-r--r--absl/strings/internal/charconv_bigint.h6
-rw-r--r--absl/strings/internal/str_format/bind.h4
-rw-r--r--absl/strings/internal/str_format/extension.h6
-rw-r--r--absl/strings/numbers.cc7
-rw-r--r--absl/strings/numbers.h9
-rw-r--r--absl/strings/string_view.h25
11 files changed, 47 insertions, 37 deletions
diff --git a/absl/strings/BUILD.bazel b/absl/strings/BUILD.bazel
index dc7e1bfd280e..d5a362d05777 100644
--- a/absl/strings/BUILD.bazel
+++ b/absl/strings/BUILD.bazel
@@ -37,7 +37,6 @@ cc_library(
         "internal/charconv_bigint.h",
         "internal/charconv_parse.cc",
         "internal/charconv_parse.h",
-        "internal/escaping.cc",
         "internal/memutil.cc",
         "internal/memutil.h",
         "internal/stl_type_traits.h",
@@ -55,7 +54,6 @@ cc_library(
         "ascii.h",
         "charconv.h",
         "escaping.h",
-        "internal/escaping.h",
         "match.h",
         "numbers.h",
         "str_cat.h",
@@ -85,11 +83,13 @@ cc_library(
 cc_library(
     name = "internal",
     srcs = [
+        "internal/escaping.cc",
         "internal/ostringstream.cc",
         "internal/utf8.cc",
     ],
     hdrs = [
         "internal/char_map.h",
+        "internal/escaping.h",
         "internal/ostringstream.h",
         "internal/resize_uninitialized.h",
         "internal/utf8.h",
@@ -99,6 +99,7 @@ cc_library(
         "//absl/base:config",
         "//absl/base:core_headers",
         "//absl/base:endian",
+        "//absl/base:raw_logging_internal",
         "//absl/meta:type_traits",
     ],
 )
diff --git a/absl/strings/CMakeLists.txt b/absl/strings/CMakeLists.txt
index 36702f7106d9..3feb5e94c4e0 100644
--- a/absl/strings/CMakeLists.txt
+++ b/absl/strings/CMakeLists.txt
@@ -38,8 +38,6 @@ absl_cc_library(
     "internal/charconv_bigint.h"
     "internal/charconv_parse.cc"
     "internal/charconv_parse.h"
-    "internal/escaping.cc"
-    "internal/escaping.h"
     "internal/memutil.cc"
     "internal/memutil.h"
     "internal/stl_type_traits.h"
@@ -74,6 +72,8 @@ absl_cc_library(
     strings_internal
   HDRS
     "internal/char_map.h"
+    "internal/escaping.cc"
+    "internal/escaping.h"
     "internal/ostringstream.h"
     "internal/resize_uninitialized.h"
     "internal/utf8.h"
@@ -86,6 +86,7 @@ absl_cc_library(
     absl::config
     absl::core_headers
     absl::endian
+    absl::raw_logging_internal
     absl::type_traits
 )
 
diff --git a/absl/strings/ascii.cc b/absl/strings/ascii.cc
index abea3e4fd38c..93bb03e95815 100644
--- a/absl/strings/ascii.cc
+++ b/absl/strings/ascii.cc
@@ -57,7 +57,7 @@ namespace ascii_internal {
 // of these bits is tightly coupled to this implementation, the individual bits
 // are not named. Note that bitfields for all characters above ASCII 127 are
 // zero-initialized.
-const unsigned char kPropertyBits[256] = {
+ABSL_DLL const unsigned char kPropertyBits[256] = {
     0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40,  // 0x00
     0x40, 0x68, 0x48, 0x48, 0x48, 0x48, 0x40, 0x40,
     0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40,  // 0x10
@@ -79,7 +79,7 @@ const unsigned char kPropertyBits[256] = {
 // Array of characters for the ascii_tolower() function. For values 'A'
 // through 'Z', return the lower-case character; otherwise, return the
 // identity of the passed character.
-const char kToLower[256] = {
+ABSL_DLL const char kToLower[256] = {
   '\x00', '\x01', '\x02', '\x03', '\x04', '\x05', '\x06', '\x07',
   '\x08', '\x09', '\x0a', '\x0b', '\x0c', '\x0d', '\x0e', '\x0f',
   '\x10', '\x11', '\x12', '\x13', '\x14', '\x15', '\x16', '\x17',
@@ -117,7 +117,7 @@ const char kToLower[256] = {
 // Array of characters for the ascii_toupper() function. For values 'a'
 // through 'z', return the upper-case character; otherwise, return the
 // identity of the passed character.
-const char kToUpper[256] = {
+ABSL_DLL const char kToUpper[256] = {
   '\x00', '\x01', '\x02', '\x03', '\x04', '\x05', '\x06', '\x07',
   '\x08', '\x09', '\x0a', '\x0b', '\x0c', '\x0d', '\x0e', '\x0f',
   '\x10', '\x11', '\x12', '\x13', '\x14', '\x15', '\x16', '\x17',
diff --git a/absl/strings/ascii.h b/absl/strings/ascii.h
index 792aabe5364a..b46bc71f35b9 100644
--- a/absl/strings/ascii.h
+++ b/absl/strings/ascii.h
@@ -56,6 +56,7 @@
 #include <string>
 
 #include "absl/base/attributes.h"
+#include "absl/base/config.h"
 #include "absl/strings/string_view.h"
 
 namespace absl {
@@ -63,13 +64,13 @@ ABSL_NAMESPACE_BEGIN
 namespace ascii_internal {
 
 // Declaration for an array of bitfields holding character information.
-extern const unsigned char kPropertyBits[256];
+ABSL_DLL extern const unsigned char kPropertyBits[256];
 
 // Declaration for the array of characters to upper-case characters.
-extern const char kToUpper[256];
+ABSL_DLL extern const char kToUpper[256];
 
 // Declaration for the array of characters to lower-case characters.
-extern const char kToLower[256];
+ABSL_DLL extern const char kToLower[256];
 
 }  // namespace ascii_internal
 
diff --git a/absl/strings/internal/charconv_bigint.cc b/absl/strings/internal/charconv_bigint.cc
index 860c27b25681..66f33e7207b3 100644
--- a/absl/strings/internal/charconv_bigint.cc
+++ b/absl/strings/internal/charconv_bigint.cc
@@ -158,12 +158,12 @@ const uint32_t* LargePowerOfFiveData(int i) {
 int LargePowerOfFiveSize(int i) { return 2 * i; }
 }  // namespace
 
-const uint32_t kFiveToNth[14] = {
+ABSL_DLL const uint32_t kFiveToNth[14] = {
     1,     5,      25,      125,     625,      3125,      15625,
     78125, 390625, 1953125, 9765625, 48828125, 244140625, 1220703125,
 };
 
-const uint32_t kTenToNth[10] = {
+ABSL_DLL const uint32_t kTenToNth[10] = {
     1, 10, 100, 1000, 10000, 100000, 1000000, 10000000, 100000000, 1000000000,
 };
 
diff --git a/absl/strings/internal/charconv_bigint.h b/absl/strings/internal/charconv_bigint.h
index 108e1eb29049..999e9ae3a295 100644
--- a/absl/strings/internal/charconv_bigint.h
+++ b/absl/strings/internal/charconv_bigint.h
@@ -20,6 +20,7 @@
 #include <iostream>
 #include <string>
 
+#include "absl/base/config.h"
 #include "absl/strings/ascii.h"
 #include "absl/strings/internal/charconv_parse.h"
 #include "absl/strings/string_view.h"
@@ -33,8 +34,9 @@ constexpr int kMaxSmallPowerOfFive = 13;
 // The largest power that 10 that can be raised to, and still fit in a uint32_t.
 constexpr int kMaxSmallPowerOfTen = 9;
 
-extern const uint32_t kFiveToNth[kMaxSmallPowerOfFive + 1];
-extern const uint32_t kTenToNth[kMaxSmallPowerOfTen + 1];
+ABSL_DLL extern const uint32_t
+    kFiveToNth[kMaxSmallPowerOfFive + 1];
+ABSL_DLL extern const uint32_t kTenToNth[kMaxSmallPowerOfTen + 1];
 
 // Large, fixed-width unsigned integer.
 //
diff --git a/absl/strings/internal/str_format/bind.h b/absl/strings/internal/str_format/bind.h
index 2bf0c0855034..cf41b19748ba 100644
--- a/absl/strings/internal/str_format/bind.h
+++ b/absl/strings/internal/str_format/bind.h
@@ -122,8 +122,8 @@ class FormatSpecTemplate
 #endif  // ABSL_INTERNAL_ENABLE_FORMAT_CHECKER
 
   template <Conv... C, typename = typename std::enable_if<
-                           sizeof...(C) == sizeof...(Args) &&
-                           AllOf(Contains(ArgumentToConv<Args>(),
+                           AllOf(sizeof...(C) == sizeof...(Args),
+                             Contains(ArgumentToConv<Args>(),
                                           C)...)>::type>
   FormatSpecTemplate(const ExtendedParsedFormat<C...>& pc)  // NOLINT
       : Base(&pc) {}
diff --git a/absl/strings/internal/str_format/extension.h b/absl/strings/internal/str_format/extension.h
index 51d7dd6fcf2b..0a7640354fd4 100644
--- a/absl/strings/internal/str_format/extension.h
+++ b/absl/strings/internal/str_format/extension.h
@@ -17,10 +17,12 @@
 #define ABSL_STRINGS_INTERNAL_STR_FORMAT_EXTENSION_H_
 
 #include <limits.h>
+
 #include <cstddef>
 #include <cstring>
 #include <ostream>
 
+#include "absl/base/config.h"
 #include "absl/base/port.h"
 #include "absl/strings/internal/str_format/output.h"
 #include "absl/strings/string_view.h"
@@ -134,7 +136,7 @@ struct Flags {
   }
 };
 
-struct LengthMod {
+struct ABSL_DLL LengthMod {
  public:
   enum Id : uint8_t {
     h, hh, l, ll, L, j, z, t, q, none
@@ -196,7 +198,7 @@ struct LengthMod {
   X_VAL(n) X_SEP X_VAL(p)
 // clang-format on
 
-struct ConversionChar {
+struct ABSL_DLL ConversionChar {
  public:
   enum Id : uint8_t {
     c, C, s, S,              // text
diff --git a/absl/strings/numbers.cc b/absl/strings/numbers.cc
index a0e5a7fd4e7d..68c26dd6f8c1 100644
--- a/absl/strings/numbers.cc
+++ b/absl/strings/numbers.cc
@@ -900,9 +900,10 @@ inline bool safe_uint_internal(absl::string_view text, IntType* value_p,
 namespace numbers_internal {
 
 // Digit conversion.
-ABSL_CONST_INIT const char kHexChar[] = "0123456789abcdef";
+ABSL_CONST_INIT ABSL_DLL const char kHexChar[] =
+    "0123456789abcdef";
 
-ABSL_CONST_INIT const char kHexTable[513] =
+ABSL_CONST_INIT ABSL_DLL const char kHexTable[513] =
     "000102030405060708090a0b0c0d0e0f"
     "101112131415161718191a1b1c1d1e1f"
     "202122232425262728292a2b2c2d2e2f"
@@ -920,7 +921,7 @@ ABSL_CONST_INIT const char kHexTable[513] =
     "e0e1e2e3e4e5e6e7e8e9eaebecedeeef"
     "f0f1f2f3f4f5f6f7f8f9fafbfcfdfeff";
 
-ABSL_CONST_INIT const char two_ASCII_digits[100][2] = {
+ABSL_CONST_INIT ABSL_DLL const char two_ASCII_digits[100][2] = {
     {'0', '0'}, {'0', '1'}, {'0', '2'}, {'0', '3'}, {'0', '4'}, {'0', '5'},
     {'0', '6'}, {'0', '7'}, {'0', '8'}, {'0', '9'}, {'1', '0'}, {'1', '1'},
     {'1', '2'}, {'1', '3'}, {'1', '4'}, {'1', '5'}, {'1', '6'}, {'1', '7'},
diff --git a/absl/strings/numbers.h b/absl/strings/numbers.h
index 612046838b8d..d872cca5dc48 100644
--- a/absl/strings/numbers.h
+++ b/absl/strings/numbers.h
@@ -36,6 +36,7 @@
 #include <string>
 #include <type_traits>
 
+#include "absl/base/config.h"
 #include "absl/base/internal/bits.h"
 #ifdef __SSE4_2__
 // TODO(jorg): Remove this when we figure out the right way
@@ -106,9 +107,11 @@ ABSL_NAMESPACE_BEGIN
 namespace numbers_internal {
 
 // Digit conversion.
-extern const char kHexChar[17];    // 0123456789abcdef
-extern const char kHexTable[513];  // 000102030405060708090a0b0c0d0e0f1011...
-extern const char two_ASCII_digits[100][2];  // 00, 01, 02, 03...
+ABSL_DLL extern const char kHexChar[17];  // 0123456789abcdef
+ABSL_DLL extern const char
+    kHexTable[513];  // 000102030405060708090a0b0c0d0e0f1011...
+ABSL_DLL extern const char
+    two_ASCII_digits[100][2];  // 00, 01, 02, 03...
 
 // Writes a two-character representation of 'i' to 'buf'. 'i' must be in the
 // range 0 <= i < 100, and buf must have space for two characters. Example:
diff --git a/absl/strings/string_view.h b/absl/strings/string_view.h
index 4f7dd6b3a17b..01965b0eb63f 100644
--- a/absl/strings/string_view.h
+++ b/absl/strings/string_view.h
@@ -28,7 +28,19 @@
 #define ABSL_STRINGS_STRING_VIEW_H_
 
 #include <algorithm>
+#include <cassert>
+#include <cstddef>
+#include <cstring>
+#include <iosfwd>
+#include <iterator>
+#include <limits>
+#include <string>
+
 #include "absl/base/config.h"
+#include "absl/base/internal/throw_delegate.h"
+#include "absl/base/macros.h"
+#include "absl/base/optimization.h"
+#include "absl/base/port.h"
 
 #ifdef ABSL_USES_STD_STRING_VIEW
 
@@ -49,19 +61,6 @@ ABSL_NAMESPACE_END
 #define ABSL_INTERNAL_STRING_VIEW_MEMCMP memcmp
 #endif  // ABSL_HAVE_BUILTIN(__builtin_memcmp)
 
-#include <cassert>
-#include <cstddef>
-#include <cstring>
-#include <iosfwd>
-#include <iterator>
-#include <limits>
-#include <string>
-
-#include "absl/base/internal/throw_delegate.h"
-#include "absl/base/macros.h"
-#include "absl/base/optimization.h"
-#include "absl/base/port.h"
-
 namespace absl {
 ABSL_NAMESPACE_BEGIN