Skip to content

Commit 12bc53e

Browse files
Abseil Teammattcalabrese-google
authored andcommitted
Export of internal Abseil changes
-- c99f979ad34f155fbeeea69b88bdc7458d89a21c by Derek Mauro <dmauro@google.com>: Remove a floating point division by zero test. This isn't testing behavior related to the library, and MSVC warns about it in opt mode. PiperOrigin-RevId: 285220804 -- 68b015491f0dbf1ab547994673281abd1f34cd4b by Gennadiy Rozental <rogeeff@google.com>: This CL introduces following changes to the class FlagImpl: * We eliminate the CommandLineFlagLocks struct. Instead callback guard and callback function are combined into a single CallbackData struct, while primary data lock is stored separately. * CallbackData member of class FlagImpl is initially set to be nullptr and is only allocated and initialized when a flag's callback is being set. For most flags we do not pay for the extra space and extra absl::Mutex now. * Primary data guard is stored in data_guard_ data member. This is a properly aligned character buffer of necessary size. During initialization of the flag we construct absl::Mutex in this space using placement new call. * We now avoid extra value copy after successful attempt to parse value out of string. Instead we swap flag's current value with tentative value we just produced. PiperOrigin-RevId: 285132636 -- ed45d118fb818969eb13094cf7827c885dfc562c by Tom Manshreck <shreck@google.com>: Change null-term* (and nul-term*) to NUL-term* in comments PiperOrigin-RevId: 285036610 -- 729619017944db895ce8d6d29c1995aa2e5628a5 by Derek Mauro <dmauro@google.com>: Use the Posix implementation of thread identity on MinGW. Some versions of MinGW suffer from thread_local bugs. PiperOrigin-RevId: 285022920 -- 39a25493503c76885bc3254c28f66a251c5b5bb0 by Greg Falcon <gfalcon@google.com>: Implementation detail change. Add further ABSL_NAMESPACE_BEGIN and _END annotation macros to files in Abseil. PiperOrigin-RevId: 285012012 GitOrigin-RevId: c99f979ad34f155fbeeea69b88bdc7458d89a21c Change-Id: I4c85d3704e45d11a9ac50d562f39640a6adbedc1
1 parent 1e39f86 commit 12bc53e

339 files changed

Lines changed: 949 additions & 83 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

absl/algorithm/BUILD.bazel

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ cc_library(
3131
hdrs = ["algorithm.h"],
3232
copts = ABSL_DEFAULT_COPTS,
3333
linkopts = ABSL_DEFAULT_LINKOPTS,
34+
deps = ["//absl/base:config"],
3435
)
3536

3637
cc_test(

absl/algorithm/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ absl_cc_library(
2121
"algorithm.h"
2222
COPTS
2323
${ABSL_DEFAULT_COPTS}
24+
DEPS
25+
absl::config
2426
PUBLIC
2527
)
2628

absl/algorithm/algorithm.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,10 @@
2626
#include <iterator>
2727
#include <type_traits>
2828

29+
#include "absl/base/config.h"
30+
2931
namespace absl {
32+
ABSL_NAMESPACE_BEGIN
3033

3134
namespace algorithm_internal {
3235

@@ -150,6 +153,7 @@ ForwardIterator rotate(ForwardIterator first, ForwardIterator middle,
150153
ForwardIterator>());
151154
}
152155

156+
ABSL_NAMESPACE_END
153157
} // namespace absl
154158

155159
#endif // ABSL_ALGORITHM_ALGORITHM_H_

absl/algorithm/container.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@
5555
#include "absl/meta/type_traits.h"
5656

5757
namespace absl {
58+
ABSL_NAMESPACE_BEGIN
5859
namespace container_algorithm_internal {
5960

6061
// NOTE: it is important to defer to ADL lookup for building with C++ modules,
@@ -1720,6 +1721,7 @@ OutputIt c_partial_sum(const InputSequence& input, OutputIt output_first,
17201721
output_first, std::forward<BinaryOp>(op));
17211722
}
17221723

1724+
ABSL_NAMESPACE_END
17231725
} // namespace absl
17241726

17251727
#endif // ABSL_ALGORITHM_CONTAINER_H_

absl/base/internal/raw_logging.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ using LogPrefixHook = bool (*)(absl::LogSeverity severity, const char* file,
154154
//
155155
// 'file' and 'line' are the file and line number where the ABSL_RAW_LOG macro
156156
// was located.
157-
// The null-terminated logged message lives in the buffer between 'buf_start'
157+
// The NUL-terminated logged message lives in the buffer between 'buf_start'
158158
// and 'buf_end'. 'prefix_end' points to the first non-prefix character of the
159159
// buffer (as written by the LogPrefixHook.)
160160
using AbortHook = void (*)(const char* file, int line, const char* buf_start,

absl/base/internal/thread_identity.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ void ClearCurrentThreadIdentity();
209209
#error ABSL_THREAD_IDENTITY_MODE cannot be direcly set
210210
#elif defined(ABSL_FORCE_THREAD_IDENTITY_MODE)
211211
#define ABSL_THREAD_IDENTITY_MODE ABSL_FORCE_THREAD_IDENTITY_MODE
212-
#elif defined(_WIN32)
212+
#elif defined(_WIN32) && !defined(__MINGW32__)
213213
#define ABSL_THREAD_IDENTITY_MODE ABSL_THREAD_IDENTITY_MODE_USE_CPP11
214214
#elif ABSL_PER_THREAD_TLS && defined(__GOOGLE_GRTE_VERSION__) && \
215215
(__GOOGLE_GRTE_VERSION__ >= 20140228L)

absl/container/BUILD.bazel

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,7 @@ cc_library(
141141
copts = ABSL_DEFAULT_COPTS,
142142
linkopts = ABSL_DEFAULT_LINKOPTS,
143143
visibility = ["//visibility:private"],
144+
deps = ["//absl/base:config"],
144145
)
145146

146147
cc_test(
@@ -478,6 +479,9 @@ cc_library(
478479
hdrs = ["internal/hashtable_debug_hooks.h"],
479480
copts = ABSL_DEFAULT_COPTS,
480481
linkopts = ABSL_DEFAULT_LINKOPTS,
482+
deps = [
483+
"//absl/base:config",
484+
],
481485
)
482486

483487
cc_library(
@@ -521,6 +525,7 @@ cc_library(
521525
hdrs = ["internal/node_hash_policy.h"],
522526
copts = ABSL_DEFAULT_COPTS,
523527
linkopts = ABSL_DEFAULT_LINKOPTS,
528+
deps = ["//absl/base:config"],
524529
)
525530

526531
cc_test(
@@ -662,6 +667,9 @@ cc_library(
662667
hdrs = ["internal/tracked.h"],
663668
copts = ABSL_TEST_COPTS,
664669
linkopts = ABSL_DEFAULT_LINKOPTS,
670+
deps = [
671+
"//absl/base:config",
672+
],
665673
)
666674

667675
cc_library(

absl/container/CMakeLists.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,8 @@ absl_cc_library(
204204
"internal/counting_allocator.h"
205205
COPTS
206206
${ABSL_DEFAULT_COPTS}
207+
DEPS
208+
absl::config
207209
)
208210

209211
absl_cc_test(
@@ -574,6 +576,8 @@ absl_cc_library(
574576
"internal/hashtable_debug_hooks.h"
575577
COPTS
576578
${ABSL_DEFAULT_COPTS}
579+
DEPS
580+
absl::config
577581
PUBLIC
578582
)
579583

@@ -593,6 +597,8 @@ absl_cc_library(
593597
"internal/node_hash_policy.h"
594598
COPTS
595599
${ABSL_DEFAULT_COPTS}
600+
DEPS
601+
absl::config
596602
PUBLIC
597603
)
598604

@@ -735,6 +741,8 @@ absl_cc_library(
735741
"internal/tracked.h"
736742
COPTS
737743
${ABSL_TEST_COPTS}
744+
DEPS
745+
absl::config
738746
TESTONLY
739747
)
740748

absl/container/btree_map.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151
#include "absl/container/internal/btree_container.h" // IWYU pragma: export
5252

5353
namespace absl {
54+
ABSL_NAMESPACE_BEGIN
5455

5556
// absl::btree_map<>
5657
//
@@ -700,6 +701,7 @@ void swap(btree_multimap<K, V, C, A> &x, btree_multimap<K, V, C, A> &y) {
700701
return x.swap(y);
701702
}
702703

704+
ABSL_NAMESPACE_END
703705
} // namespace absl
704706

705707
#endif // ABSL_CONTAINER_BTREE_MAP_H_

absl/container/btree_set.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151
#include "absl/container/internal/btree_container.h" // IWYU pragma: export
5252

5353
namespace absl {
54+
ABSL_NAMESPACE_BEGIN
5455

5556
// absl::btree_set<>
5657
//
@@ -648,6 +649,7 @@ void swap(btree_multiset<K, C, A> &x, btree_multiset<K, C, A> &y) {
648649
return x.swap(y);
649650
}
650651

652+
ABSL_NAMESPACE_END
651653
} // namespace absl
652654

653655
#endif // ABSL_CONTAINER_BTREE_SET_H_

0 commit comments

Comments
 (0)