From 564001ae506a17c51fa1223684a78f05f91d3d91 Mon Sep 17 00:00:00 2001 From: Abseil Team Date: Fri, 10 Jan 2020 08:42:35 -0800 Subject: Export of internal Abseil changes -- 5448463d79c8473d29b6aae62359eaec09e517b0 by Greg Falcon : Rename absl_types_options.h to absl_alternate_options.h, to reflect that we are testing more than just types with this file. PiperOrigin-RevId: 289099882 -- 8008a5662d1b27c4ea442575405eb0538f63a636 by Abseil Team : Internal change PiperOrigin-RevId: 289097666 -- 0e9398fae540bdb7dd752245b83456f3784c50ca by Abseil Team : Internal change PiperOrigin-RevId: 288985613 GitOrigin-RevId: 5448463d79c8473d29b6aae62359eaec09e517b0 Change-Id: I5bc1ee156294793cacf3acbc447c0ea27ce8af4f --- absl/flags/BUILD.bazel | 35 ++++++++++++++++++++++++----- absl/flags/CMakeLists.txt | 29 +++++++++++++++++++++++- absl/flags/declare.h | 1 + absl/flags/flag.cc | 4 +++- absl/flags/flag.h | 3 +++ absl/flags/flag_test.cc | 12 +++++++++- absl/flags/internal/commandlineflag.h | 6 +++++ absl/flags/internal/commandlineflag_test.cc | 3 ++- absl/flags/internal/flag.cc | 16 ++++++++++++- absl/flags/internal/flag.h | 6 +++++ absl/flags/internal/parse.h | 1 + absl/flags/internal/path_util.h | 1 + absl/flags/internal/program_name.cc | 5 +++++ absl/flags/internal/program_name.h | 1 + absl/flags/internal/program_name_test.cc | 3 +++ absl/flags/internal/registry.cc | 15 +++++++++++-- absl/flags/internal/registry.h | 2 ++ absl/flags/internal/type_erased.cc | 10 +++++++-- absl/flags/internal/type_erased.h | 2 ++ absl/flags/internal/type_erased_test.cc | 7 ++++-- absl/flags/internal/usage.cc | 10 +++++++-- absl/flags/internal/usage.h | 1 + absl/flags/internal/usage_test.cc | 8 ++++++- absl/flags/marshalling.cc | 9 ++++++++ absl/flags/marshalling.h | 1 + absl/flags/marshalling_test.cc | 5 +++++ absl/flags/parse.cc | 15 +++++++++++++ absl/flags/parse.h | 1 + absl/flags/parse_test.cc | 9 +++++++- absl/flags/usage.cc | 7 ++++++ absl/flags/usage.h | 1 + absl/flags/usage_config.cc | 8 +++++-- absl/flags/usage_config.h | 1 + absl/flags/usage_config_test.cc | 3 +++ ci/absl_alternate_options.h | 28 +++++++++++++++++++++++ ci/absl_types_options.h | 28 ----------------------- 36 files changed, 247 insertions(+), 50 deletions(-) create mode 100644 ci/absl_alternate_options.h delete mode 100644 ci/absl_types_options.h diff --git a/absl/flags/BUILD.bazel b/absl/flags/BUILD.bazel index 504acde..6c7b2b6 100644 --- a/absl/flags/BUILD.bazel +++ b/absl/flags/BUILD.bazel @@ -41,6 +41,7 @@ cc_library( ":config", ":handle", ":registry", + "//absl/base:config", "//absl/base:core_headers", "//absl/memory", "//absl/strings", @@ -63,6 +64,8 @@ cc_library( ], deps = [ ":path_util", + "//absl/base:config", + "//absl/base:core_headers", "//absl/strings", "//absl/synchronization", ], @@ -79,6 +82,7 @@ cc_library( "//absl/flags:__pkg__", ], deps = [ + "//absl/base:config", "//absl/strings", ], ) @@ -97,6 +101,7 @@ cc_library( deps = [ ":path_util", ":program_name", + "//absl/base:config", "//absl/base:core_headers", "//absl/strings", "//absl/synchronization", @@ -114,7 +119,9 @@ cc_library( copts = ABSL_DEFAULT_COPTS, linkopts = ABSL_DEFAULT_LINKOPTS, deps = [ + "//absl/base:config", "//absl/base:core_headers", + "//absl/base:log_severity", "//absl/strings", "//absl/strings:str_format", ], @@ -131,9 +138,10 @@ cc_library( "//absl/flags:__pkg__", ], deps = [ - ":config", ":marshalling", + "//absl/base:config", "//absl/base:core_headers", + "//absl/strings", "//absl/types:optional", ], ) @@ -156,8 +164,8 @@ cc_library( deps = [ ":config", ":handle", + "//absl/base:config", "//absl/base:core_headers", - "//absl/base:dynamic_annotations", "//absl/base:raw_logging_internal", "//absl/strings", "//absl/synchronization", @@ -180,9 +188,10 @@ cc_library( ":flag_internal", ":handle", ":marshalling", + ":registry", "//absl/base", + "//absl/base:config", "//absl/base:core_headers", - "//absl/memory", "//absl/strings", ], ) @@ -203,11 +212,14 @@ cc_library( deps = [ ":config", ":flag", + ":flag_internal", ":handle", ":path_util", ":program_name", + ":registry", + "//absl/base:config", + "//absl/base:core_headers", "//absl/strings", - "//absl/synchronization", ], ) @@ -223,6 +235,8 @@ cc_library( linkopts = ABSL_DEFAULT_LINKOPTS, deps = [ ":usage_internal", + "//absl/base:config", + "//absl/base:core_headers", "//absl/strings", "//absl/synchronization", ], @@ -240,10 +254,14 @@ cc_library( deps = [ ":config", ":flag", + ":flag_internal", + ":handle", ":program_name", ":registry", ":usage", ":usage_internal", + "//absl/base:config", + "//absl/base:core_headers", "//absl/strings", "//absl/synchronization", ], @@ -297,6 +315,10 @@ cc_test( deps = [ ":config", ":flag", + ":flag_internal", + ":handle", + ":registry", + "//absl/base:core_headers", "//absl/strings", "@com_google_googletest//:gtest_main", ], @@ -341,6 +363,7 @@ cc_test( deps = [ ":flag", ":parse", + ":registry", "//absl/base:raw_logging_internal", "//absl/base:scoped_set_env", "//absl/strings", @@ -374,9 +397,10 @@ cc_test( linkopts = ABSL_DEFAULT_LINKOPTS, deps = [ ":flag", + ":handle", + ":marshalling", ":registry", "//absl/memory", - "//absl/strings", "@com_google_googletest//:gtest_main", ], ) @@ -412,6 +436,7 @@ cc_test( ":parse", ":path_util", ":program_name", + ":registry", ":usage", ":usage_internal", "//absl/memory", diff --git a/absl/flags/CMakeLists.txt b/absl/flags/CMakeLists.txt index 7c63821..20e6682 100644 --- a/absl/flags/CMakeLists.txt +++ b/absl/flags/CMakeLists.txt @@ -27,6 +27,7 @@ absl_cc_library( LINKOPTS ${ABSL_DEFAULT_LINKOPTS} DEPS + absl::config absl::flags_config absl::flags_handle absl::flags_registry @@ -47,6 +48,8 @@ absl_cc_library( LINKOPTS ${ABSL_DEFAULT_LINKOPTS} DEPS + absl::config + absl::core_headers absl::flags_path_util absl::strings absl::synchronization @@ -64,6 +67,7 @@ absl_cc_library( LINKOPTS ${ABSL_DEFAULT_LINKOPTS} DEPS + absl::config absl::strings PUBLIC ) @@ -81,6 +85,7 @@ absl_cc_library( LINKOPTS ${ABSL_DEFAULT_LINKOPTS} DEPS + absl::config absl::flags_path_util absl::flags_program_name absl::core_headers @@ -100,7 +105,9 @@ absl_cc_library( LINKOPTS ${ABSL_DEFAULT_LINKOPTS} DEPS + absl::config absl::core_headers + absl::log_severity absl::strings absl::str_format ) @@ -116,6 +123,7 @@ absl_cc_library( LINKOPTS ${ABSL_DEFAULT_LINKOPTS} DEPS + absl::config absl::flags_config absl::flags_marshalling absl::core_headers @@ -140,10 +148,10 @@ absl_cc_library( LINKOPTS ${ABSL_DEFAULT_LINKOPTS} DEPS + absl::config absl::flags_config absl::flags_handle absl::core_headers - absl::dynamic_annotations absl::raw_logging_internal absl::strings absl::synchronization @@ -162,10 +170,12 @@ absl_cc_library( LINKOPTS ${ABSL_DEFAULT_LINKOPTS} DEPS + absl::config absl::flags_config absl::flags_handle absl::flags_internal absl::flags_marshalling + absl::flags_registry absl::base absl::core_headers absl::strings @@ -184,11 +194,14 @@ absl_cc_library( LINKOPTS ${ABSL_DEFAULT_LINKOPTS} DEPS + absl::config absl::flags_config absl::flags absl::flags_handle + absl::flags_internal absl::flags_path_util absl::flags_program_name + absl::flags_registry absl::strings absl::synchronization ) @@ -205,6 +218,8 @@ absl_cc_library( LINKOPTS ${ABSL_DEFAULT_LINKOPTS} DEPS + absl::config + absl::core_headers absl::flags_usage_internal absl::strings absl::synchronization @@ -223,8 +238,12 @@ absl_cc_library( LINKOPTS ${ABSL_DEFAULT_LINKOPTS} DEPS + absl::config + absl::core_headers absl::flags_config absl::flags + absl::flags_handle + absl::flags_internal absl::flags_program_name absl::flags_registry absl::flags_usage @@ -273,8 +292,12 @@ absl_cc_test( COPTS ${ABSL_TEST_COPTS} DEPS + absl::core_headers absl::flags absl::flags_config + absl::flags_handle + absl::flags_internal + absl::flags_registry absl::strings gtest_main ) @@ -301,6 +324,7 @@ absl_cc_test( DEPS absl::flags absl::flags_parse + absl::flags_registry absl::raw_logging_internal absl::scoped_set_env absl::span @@ -342,6 +366,8 @@ absl_cc_test( ${ABSL_TEST_COPTS} DEPS absl::flags + absl::flags_handle + absl::flags_marshalling absl::flags_registry absl::memory absl::strings @@ -376,6 +402,7 @@ absl_cc_test( absl::flags_path_util absl::flags_program_name absl::flags_parse + absl::flags_registry absl::flags_usage absl::memory absl::strings diff --git a/absl/flags/declare.h b/absl/flags/declare.h index f7509ce..0f8cc6a 100644 --- a/absl/flags/declare.h +++ b/absl/flags/declare.h @@ -25,6 +25,7 @@ #ifndef ABSL_FLAGS_DECLARE_H_ #define ABSL_FLAGS_DECLARE_H_ +#include "absl/base/config.h" #include "absl/strings/string_view.h" namespace absl { diff --git a/absl/flags/flag.cc b/absl/flags/flag.cc index 491a66b..9af8007 100644 --- a/absl/flags/flag.cc +++ b/absl/flags/flag.cc @@ -15,7 +15,9 @@ #include "absl/flags/flag.h" -#include +#include "absl/base/config.h" +#include "absl/flags/internal/commandlineflag.h" +#include "absl/flags/internal/flag.h" namespace absl { ABSL_NAMESPACE_BEGIN diff --git a/absl/flags/flag.h b/absl/flags/flag.h index 62e73f8..cc22cdb 100644 --- a/absl/flags/flag.h +++ b/absl/flags/flag.h @@ -29,14 +29,17 @@ #ifndef ABSL_FLAGS_FLAG_H_ #define ABSL_FLAGS_FLAG_H_ +#include #include #include "absl/base/attributes.h" #include "absl/base/casts.h" +#include "absl/base/config.h" #include "absl/flags/config.h" #include "absl/flags/declare.h" #include "absl/flags/internal/commandlineflag.h" #include "absl/flags/internal/flag.h" +#include "absl/flags/internal/registry.h" #include "absl/flags/marshalling.h" namespace absl { diff --git a/absl/flags/flag_test.cc b/absl/flags/flag_test.cc index 28c513b..7b50fd6 100644 --- a/absl/flags/flag_test.cc +++ b/absl/flags/flag_test.cc @@ -15,15 +15,25 @@ #include "absl/flags/flag.h" -#include +#include + +#include #include +#include #include "gtest/gtest.h" +#include "absl/base/attributes.h" +#include "absl/flags/config.h" +#include "absl/flags/declare.h" +#include "absl/flags/internal/commandlineflag.h" +#include "absl/flags/internal/flag.h" +#include "absl/flags/internal/registry.h" #include "absl/flags/usage_config.h" #include "absl/strings/match.h" #include "absl/strings/numbers.h" #include "absl/strings/str_cat.h" #include "absl/strings/str_split.h" +#include "absl/strings/string_view.h" ABSL_DECLARE_FLAG(int64_t, mistyped_int_flag); ABSL_DECLARE_FLAG(std::vector, mistyped_string_flag); diff --git a/absl/flags/internal/commandlineflag.h b/absl/flags/internal/commandlineflag.h index 1862306..4bc0c12 100644 --- a/absl/flags/internal/commandlineflag.h +++ b/absl/flags/internal/commandlineflag.h @@ -16,10 +16,16 @@ #ifndef ABSL_FLAGS_INTERNAL_COMMANDLINEFLAG_H_ #define ABSL_FLAGS_INTERNAL_COMMANDLINEFLAG_H_ +#include +#include + #include +#include +#include "absl/base/config.h" #include "absl/base/macros.h" #include "absl/flags/marshalling.h" +#include "absl/strings/string_view.h" #include "absl/types/optional.h" namespace absl { diff --git a/absl/flags/internal/commandlineflag_test.cc b/absl/flags/internal/commandlineflag_test.cc index 5a0c271..0e8bc31 100644 --- a/absl/flags/internal/commandlineflag_test.cc +++ b/absl/flags/internal/commandlineflag_test.cc @@ -15,7 +15,7 @@ #include "absl/flags/internal/commandlineflag.h" -#include +#include #include #include "gtest/gtest.h" @@ -25,6 +25,7 @@ #include "absl/memory/memory.h" #include "absl/strings/match.h" #include "absl/strings/str_cat.h" +#include "absl/strings/string_view.h" ABSL_FLAG(int, int_flag, 201, "int_flag help"); ABSL_FLAG(std::string, string_flag, "dflt", diff --git a/absl/flags/internal/flag.cc b/absl/flags/internal/flag.cc index 6979dc4..2ef8e3f 100644 --- a/absl/flags/internal/flag.cc +++ b/absl/flags/internal/flag.cc @@ -15,9 +15,23 @@ #include "absl/flags/internal/flag.h" +#include +#include +#include + +#include +#include +#include +#include + +#include "absl/base/attributes.h" +#include "absl/base/config.h" +#include "absl/base/const_init.h" #include "absl/base/optimization.h" -#include "absl/flags/config.h" +#include "absl/flags/internal/commandlineflag.h" #include "absl/flags/usage_config.h" +#include "absl/strings/str_cat.h" +#include "absl/strings/string_view.h" #include "absl/synchronization/mutex.h" namespace absl { diff --git a/absl/flags/internal/flag.h b/absl/flags/internal/flag.h index a5edfd1..ec467c3 100644 --- a/absl/flags/internal/flag.h +++ b/absl/flags/internal/flag.h @@ -16,15 +16,21 @@ #ifndef ABSL_FLAGS_INTERNAL_FLAG_H_ #define ABSL_FLAGS_INTERNAL_FLAG_H_ +#include + #include #include +#include +#include +#include "absl/base/config.h" #include "absl/base/thread_annotations.h" #include "absl/flags/config.h" #include "absl/flags/internal/commandlineflag.h" #include "absl/flags/internal/registry.h" #include "absl/memory/memory.h" #include "absl/strings/str_cat.h" +#include "absl/strings/string_view.h" #include "absl/synchronization/mutex.h" namespace absl { diff --git a/absl/flags/internal/parse.h b/absl/flags/internal/parse.h index e534635..03e8a07 100644 --- a/absl/flags/internal/parse.h +++ b/absl/flags/internal/parse.h @@ -19,6 +19,7 @@ #include #include +#include "absl/base/config.h" #include "absl/flags/declare.h" ABSL_DECLARE_FLAG(std::vector, flagfile); diff --git a/absl/flags/internal/path_util.h b/absl/flags/internal/path_util.h index 4169637..365c830 100644 --- a/absl/flags/internal/path_util.h +++ b/absl/flags/internal/path_util.h @@ -16,6 +16,7 @@ #ifndef ABSL_FLAGS_INTERNAL_PATH_UTIL_H_ #define ABSL_FLAGS_INTERNAL_PATH_UTIL_H_ +#include "absl/base/config.h" #include "absl/strings/match.h" #include "absl/strings/string_view.h" diff --git a/absl/flags/internal/program_name.cc b/absl/flags/internal/program_name.cc index df0c330..51d698d 100644 --- a/absl/flags/internal/program_name.cc +++ b/absl/flags/internal/program_name.cc @@ -17,7 +17,12 @@ #include +#include "absl/base/attributes.h" +#include "absl/base/config.h" +#include "absl/base/const_init.h" +#include "absl/base/thread_annotations.h" #include "absl/flags/internal/path_util.h" +#include "absl/strings/string_view.h" #include "absl/synchronization/mutex.h" namespace absl { diff --git a/absl/flags/internal/program_name.h b/absl/flags/internal/program_name.h index 317a7c5..b99b94f 100644 --- a/absl/flags/internal/program_name.h +++ b/absl/flags/internal/program_name.h @@ -18,6 +18,7 @@ #include +#include "absl/base/config.h" #include "absl/strings/string_view.h" // -------------------------------------------------------------------- diff --git a/absl/flags/internal/program_name_test.cc b/absl/flags/internal/program_name_test.cc index ed69218..269142f 100644 --- a/absl/flags/internal/program_name_test.cc +++ b/absl/flags/internal/program_name_test.cc @@ -15,8 +15,11 @@ #include "absl/flags/internal/program_name.h" +#include + #include "gtest/gtest.h" #include "absl/strings/match.h" +#include "absl/strings/string_view.h" namespace { diff --git a/absl/flags/internal/registry.cc b/absl/flags/internal/registry.cc index ae5afd4..7889b1f 100644 --- a/absl/flags/internal/registry.cc +++ b/absl/flags/internal/registry.cc @@ -15,9 +15,20 @@ #include "absl/flags/internal/registry.h" -#include "absl/base/dynamic_annotations.h" +#include +#include + +#include +#include +#include +#include +#include +#include + +#include "absl/base/config.h" #include "absl/base/internal/raw_logging.h" -#include "absl/flags/config.h" +#include "absl/base/thread_annotations.h" +#include "absl/flags/internal/commandlineflag.h" #include "absl/flags/usage_config.h" #include "absl/strings/str_cat.h" #include "absl/strings/string_view.h" diff --git a/absl/flags/internal/registry.h b/absl/flags/internal/registry.h index d2145a8..99cb685 100644 --- a/absl/flags/internal/registry.h +++ b/absl/flags/internal/registry.h @@ -20,8 +20,10 @@ #include #include +#include "absl/base/config.h" #include "absl/base/macros.h" #include "absl/flags/internal/commandlineflag.h" +#include "absl/strings/string_view.h" // -------------------------------------------------------------------- // Global flags registry API. diff --git a/absl/flags/internal/type_erased.cc b/absl/flags/internal/type_erased.cc index 7910db8..490bc4e 100644 --- a/absl/flags/internal/type_erased.cc +++ b/absl/flags/internal/type_erased.cc @@ -15,10 +15,16 @@ #include "absl/flags/internal/type_erased.h" +#include + +#include + +#include "absl/base/config.h" #include "absl/base/internal/raw_logging.h" -#include "absl/flags/config.h" +#include "absl/flags/internal/commandlineflag.h" +#include "absl/flags/internal/registry.h" #include "absl/flags/usage_config.h" -#include "absl/strings/str_cat.h" +#include "absl/strings/string_view.h" namespace absl { ABSL_NAMESPACE_BEGIN diff --git a/absl/flags/internal/type_erased.h b/absl/flags/internal/type_erased.h index 6cbd84c..188429c 100644 --- a/absl/flags/internal/type_erased.h +++ b/absl/flags/internal/type_erased.h @@ -18,8 +18,10 @@ #include +#include "absl/base/config.h" #include "absl/flags/internal/commandlineflag.h" #include "absl/flags/internal/registry.h" +#include "absl/strings/string_view.h" // -------------------------------------------------------------------- // Registry interfaces operating on type erased handles. diff --git a/absl/flags/internal/type_erased_test.cc b/absl/flags/internal/type_erased_test.cc index ac749a6..033e00e 100644 --- a/absl/flags/internal/type_erased_test.cc +++ b/absl/flags/internal/type_erased_test.cc @@ -15,12 +15,15 @@ #include "absl/flags/internal/type_erased.h" -#include +#include +#include #include "gtest/gtest.h" #include "absl/flags/flag.h" +#include "absl/flags/internal/commandlineflag.h" +#include "absl/flags/internal/registry.h" +#include "absl/flags/marshalling.h" #include "absl/memory/memory.h" -#include "absl/strings/str_cat.h" ABSL_FLAG(int, int_flag, 1, "int_flag help"); ABSL_FLAG(std::string, string_flag, "dflt", "string_flag help"); diff --git a/absl/flags/internal/usage.cc b/absl/flags/internal/usage.cc index 4602c01..ff90716 100644 --- a/absl/flags/internal/usage.cc +++ b/absl/flags/internal/usage.cc @@ -15,18 +15,24 @@ #include "absl/flags/internal/usage.h" +#include #include +#include #include +#include +#include +#include "absl/base/config.h" #include "absl/flags/flag.h" +#include "absl/flags/internal/commandlineflag.h" +#include "absl/flags/internal/flag.h" #include "absl/flags/internal/path_util.h" #include "absl/flags/internal/program_name.h" +#include "absl/flags/internal/registry.h" #include "absl/flags/usage_config.h" -#include "absl/strings/ascii.h" #include "absl/strings/str_cat.h" #include "absl/strings/str_split.h" #include "absl/strings/string_view.h" -#include "absl/synchronization/mutex.h" ABSL_FLAG(bool, help, false, "show help on important flags for this binary [tip: all flags can " diff --git a/absl/flags/internal/usage.h b/absl/flags/internal/usage.h index 5e8ca6a..6b080fd 100644 --- a/absl/flags/internal/usage.h +++ b/absl/flags/internal/usage.h @@ -19,6 +19,7 @@ #include #include +#include "absl/base/config.h" #include "absl/flags/declare.h" #include "absl/flags/internal/commandlineflag.h" #include "absl/strings/string_view.h" diff --git a/absl/flags/internal/usage_test.cc b/absl/flags/internal/usage_test.cc index 1e9ffdf..e1e57e5 100644 --- a/absl/flags/internal/usage_test.cc +++ b/absl/flags/internal/usage_test.cc @@ -15,17 +15,23 @@ #include "absl/flags/internal/usage.h" +#include + #include +#include #include "gtest/gtest.h" +#include "absl/flags/declare.h" #include "absl/flags/flag.h" +#include "absl/flags/internal/parse.h" #include "absl/flags/internal/path_util.h" #include "absl/flags/internal/program_name.h" -#include "absl/flags/parse.h" +#include "absl/flags/internal/registry.h" #include "absl/flags/usage.h" #include "absl/flags/usage_config.h" #include "absl/memory/memory.h" #include "absl/strings/match.h" +#include "absl/strings/string_view.h" ABSL_FLAG(int, usage_reporting_test_flag_01, 101, "usage_reporting_test_flag_01 help message"); diff --git a/absl/flags/marshalling.cc b/absl/flags/marshalling.cc index 87020a2..6f2ddda 100644 --- a/absl/flags/marshalling.cc +++ b/absl/flags/marshalling.cc @@ -15,16 +15,25 @@ #include "absl/flags/marshalling.h" +#include + +#include #include +#include #include +#include +#include "absl/base/config.h" +#include "absl/base/log_severity.h" #include "absl/base/macros.h" +#include "absl/strings/ascii.h" #include "absl/strings/match.h" #include "absl/strings/numbers.h" #include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" #include "absl/strings/str_join.h" #include "absl/strings/str_split.h" +#include "absl/strings/string_view.h" namespace absl { ABSL_NAMESPACE_BEGIN diff --git a/absl/flags/marshalling.h b/absl/flags/marshalling.h index b9fca75..1f3dc2d 100644 --- a/absl/flags/marshalling.h +++ b/absl/flags/marshalling.h @@ -165,6 +165,7 @@ #include #include +#include "absl/base/config.h" #include "absl/strings/string_view.h" namespace absl { diff --git a/absl/flags/marshalling_test.cc b/absl/flags/marshalling_test.cc index 37cd194..4a64ce1 100644 --- a/absl/flags/marshalling_test.cc +++ b/absl/flags/marshalling_test.cc @@ -15,7 +15,12 @@ #include "absl/flags/marshalling.h" +#include + #include +#include +#include +#include #include "gtest/gtest.h" diff --git a/absl/flags/parse.cc b/absl/flags/parse.cc index a288ace..812e498 100644 --- a/absl/flags/parse.cc +++ b/absl/flags/parse.cc @@ -17,21 +17,36 @@ #include +#include #include #include +#include +#include #include +#include +#include #ifdef _WIN32 #include #endif +#include "absl/base/attributes.h" +#include "absl/base/config.h" +#include "absl/base/const_init.h" +#include "absl/base/thread_annotations.h" +#include "absl/flags/config.h" #include "absl/flags/flag.h" +#include "absl/flags/internal/commandlineflag.h" +#include "absl/flags/internal/flag.h" +#include "absl/flags/internal/parse.h" #include "absl/flags/internal/program_name.h" #include "absl/flags/internal/registry.h" #include "absl/flags/internal/usage.h" #include "absl/flags/usage.h" #include "absl/flags/usage_config.h" +#include "absl/strings/ascii.h" #include "absl/strings/str_cat.h" +#include "absl/strings/string_view.h" #include "absl/strings/strip.h" #include "absl/synchronization/mutex.h" diff --git a/absl/flags/parse.h b/absl/flags/parse.h index 871fc99..f37b060 100644 --- a/absl/flags/parse.h +++ b/absl/flags/parse.h @@ -26,6 +26,7 @@ #include #include +#include "absl/base/config.h" #include "absl/flags/internal/parse.h" namespace absl { diff --git a/absl/flags/parse_test.cc b/absl/flags/parse_test.cc index f89fa96..6f49377 100644 --- a/absl/flags/parse_test.cc +++ b/absl/flags/parse_test.cc @@ -15,15 +15,22 @@ #include "absl/flags/parse.h" +#include + #include +#include +#include #include "gmock/gmock.h" #include "gtest/gtest.h" #include "absl/base/internal/raw_logging.h" #include "absl/base/internal/scoped_set_env.h" +#include "absl/flags/declare.h" #include "absl/flags/flag.h" -#include "absl/strings/match.h" +#include "absl/flags/internal/parse.h" +#include "absl/flags/internal/registry.h" #include "absl/strings/str_cat.h" +#include "absl/strings/string_view.h" #include "absl/strings/substitute.h" #include "absl/types/span.h" diff --git a/absl/flags/usage.cc b/absl/flags/usage.cc index 60459bc..452f667 100644 --- a/absl/flags/usage.cc +++ b/absl/flags/usage.cc @@ -14,9 +14,16 @@ // limitations under the License. #include "absl/flags/usage.h" +#include + #include +#include "absl/base/attributes.h" +#include "absl/base/config.h" +#include "absl/base/const_init.h" +#include "absl/base/thread_annotations.h" #include "absl/flags/internal/usage.h" +#include "absl/strings/string_view.h" #include "absl/synchronization/mutex.h" namespace absl { diff --git a/absl/flags/usage.h b/absl/flags/usage.h index 299e5c3..ad12ab7 100644 --- a/absl/flags/usage.h +++ b/absl/flags/usage.h @@ -16,6 +16,7 @@ #ifndef ABSL_FLAGS_USAGE_H_ #define ABSL_FLAGS_USAGE_H_ +#include "absl/base/config.h" #include "absl/strings/string_view.h" // -------------------------------------------------------------------- diff --git a/absl/flags/usage_config.cc b/absl/flags/usage_config.cc index 21a2dd0..2d837ec 100644 --- a/absl/flags/usage_config.cc +++ b/absl/flags/usage_config.cc @@ -16,12 +16,16 @@ #include "absl/flags/usage_config.h" #include -#include +#include #include "absl/base/attributes.h" +#include "absl/base/config.h" +#include "absl/base/const_init.h" +#include "absl/base/thread_annotations.h" #include "absl/flags/internal/path_util.h" #include "absl/flags/internal/program_name.h" -#include "absl/strings/str_cat.h" +#include "absl/strings/match.h" +#include "absl/strings/string_view.h" #include "absl/strings/strip.h" #include "absl/synchronization/mutex.h" diff --git a/absl/flags/usage_config.h b/absl/flags/usage_config.h index e6428e0..0ed7e1b 100644 --- a/absl/flags/usage_config.h +++ b/absl/flags/usage_config.h @@ -27,6 +27,7 @@ #include #include +#include "absl/base/config.h" #include "absl/strings/string_view.h" // ----------------------------------------------------------------------------- diff --git a/absl/flags/usage_config_test.cc b/absl/flags/usage_config_test.cc index 3bde13a..70eca30 100644 --- a/absl/flags/usage_config_test.cc +++ b/absl/flags/usage_config_test.cc @@ -15,10 +15,13 @@ #include "absl/flags/usage_config.h" +#include + #include "gtest/gtest.h" #include "absl/flags/internal/path_util.h" #include "absl/flags/internal/program_name.h" #include "absl/strings/match.h" +#include "absl/strings/string_view.h" namespace { diff --git a/ci/absl_alternate_options.h b/ci/absl_alternate_options.h new file mode 100644 index 0000000..f0c21fe --- /dev/null +++ b/ci/absl_alternate_options.h @@ -0,0 +1,28 @@ +#ifndef ABSL_BASE_OPTIONS_H_ +#define ABSL_BASE_OPTIONS_H_ + +// Copyright 2019 The Abseil Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Alternate options.h file, used in continuous integration testing to exercise +// option settings not used by default. + +#define ABSL_OPTION_USE_STD_ANY 0 +#define ABSL_OPTION_USE_STD_OPTIONAL 0 +#define ABSL_OPTION_USE_STD_STRING_VIEW 0 +#define ABSL_OPTION_USE_STD_VARIANT 0 +#define ABSL_OPTION_USE_INLINE_NAMESPACE 1 +#define ABSL_OPTION_INLINE_NAMESPACE_NAME ns + +#endif // ABSL_BASE_OPTIONS_H_ diff --git a/ci/absl_types_options.h b/ci/absl_types_options.h deleted file mode 100644 index 307fde6..0000000 --- a/ci/absl_types_options.h +++ /dev/null @@ -1,28 +0,0 @@ -#ifndef ABSL_BASE_OPTIONS_H_ -#define ABSL_BASE_OPTIONS_H_ - -// Copyright 2019 The Abseil Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Alternate options.h file, requesting to always use Abseil implementations -// of the workalike types, regardless of language version. - -#define ABSL_OPTION_USE_STD_ANY 0 -#define ABSL_OPTION_USE_STD_OPTIONAL 0 -#define ABSL_OPTION_USE_STD_STRING_VIEW 0 -#define ABSL_OPTION_USE_STD_VARIANT 0 -#define ABSL_OPTION_USE_INLINE_NAMESPACE 1 -#define ABSL_OPTION_INLINE_NAMESPACE_NAME ns - -#endif // ABSL_BASE_OPTIONS_H_ -- cgit v1.2.3