Skip to content

Commit 8a14958

Browse files
authored
Merge pull request grpc#22729 from markdroth/absl_string_view_host_port
Remove StringViewToCString() and src/core/lib/gprpp/string_view.h
2 parents 23c8cfc + d74548e commit 8a14958

Some content is hidden

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

47 files changed

+238
-490
lines changed

BUILD

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -554,7 +554,6 @@ grpc_cc_library(
554554
"src/core/lib/gprpp/map.h",
555555
"src/core/lib/gprpp/memory.h",
556556
"src/core/lib/gprpp/mpscq.h",
557-
"src/core/lib/gprpp/string_view.h",
558557
"src/core/lib/gprpp/sync.h",
559558
"src/core/lib/gprpp/thd.h",
560559
"src/core/lib/profiling/timers.h",

BUILD.gn

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,6 @@ config("grpc_config") {
160160
"src/core/lib/gprpp/memory.h",
161161
"src/core/lib/gprpp/mpscq.cc",
162162
"src/core/lib/gprpp/mpscq.h",
163-
"src/core/lib/gprpp/string_view.h",
164163
"src/core/lib/gprpp/sync.h",
165164
"src/core/lib/gprpp/thd.h",
166165
"src/core/lib/gprpp/thd_posix.cc",

CMakeLists.txt

Lines changed: 0 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -798,7 +798,6 @@ if(gRPC_BUILD_TESTS)
798798
add_dependencies(buildtests_cxx streaming_throughput_test)
799799
endif()
800800
add_dependencies(buildtests_cxx string_ref_test)
801-
add_dependencies(buildtests_cxx string_view_test)
802801
add_dependencies(buildtests_cxx test_cpp_client_credentials_test)
803802
add_dependencies(buildtests_cxx test_cpp_util_slice_test)
804803
add_dependencies(buildtests_cxx test_cpp_util_time_test)
@@ -13766,44 +13765,6 @@ target_link_libraries(string_ref_test
1376613765
)
1376713766

1376813767

13769-
endif()
13770-
if(gRPC_BUILD_TESTS)
13771-
13772-
add_executable(string_view_test
13773-
test/core/gprpp/string_view_test.cc
13774-
third_party/googletest/googletest/src/gtest-all.cc
13775-
third_party/googletest/googlemock/src/gmock-all.cc
13776-
)
13777-
13778-
target_include_directories(string_view_test
13779-
PRIVATE
13780-
${CMAKE_CURRENT_SOURCE_DIR}
13781-
${CMAKE_CURRENT_SOURCE_DIR}/include
13782-
${_gRPC_ADDRESS_SORTING_INCLUDE_DIR}
13783-
${_gRPC_SSL_INCLUDE_DIR}
13784-
${_gRPC_UPB_GENERATED_DIR}
13785-
${_gRPC_UPB_GRPC_GENERATED_DIR}
13786-
${_gRPC_UPB_INCLUDE_DIR}
13787-
${_gRPC_ZLIB_INCLUDE_DIR}
13788-
third_party/googletest/googletest/include
13789-
third_party/googletest/googletest
13790-
third_party/googletest/googlemock/include
13791-
third_party/googletest/googlemock
13792-
${_gRPC_PROTO_GENS_DIR}
13793-
)
13794-
13795-
target_link_libraries(string_view_test
13796-
${_gRPC_PROTOBUF_LIBRARIES}
13797-
${_gRPC_ALLTARGETS_LIBRARIES}
13798-
grpc_test_util
13799-
grpc
13800-
gpr
13801-
address_sorting
13802-
upb
13803-
${_gRPC_GFLAGS_LIBRARIES}
13804-
)
13805-
13806-
1380713768
endif()
1380813769
if(gRPC_BUILD_TESTS)
1380913770

Makefile

Lines changed: 0 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1289,7 +1289,6 @@ status_metadata_test: $(BINDIR)/$(CONFIG)/status_metadata_test
12891289
status_util_test: $(BINDIR)/$(CONFIG)/status_util_test
12901290
streaming_throughput_test: $(BINDIR)/$(CONFIG)/streaming_throughput_test
12911291
string_ref_test: $(BINDIR)/$(CONFIG)/string_ref_test
1292-
string_view_test: $(BINDIR)/$(CONFIG)/string_view_test
12931292
test_cpp_client_credentials_test: $(BINDIR)/$(CONFIG)/test_cpp_client_credentials_test
12941293
test_cpp_util_slice_test: $(BINDIR)/$(CONFIG)/test_cpp_util_slice_test
12951294
test_cpp_util_time_test: $(BINDIR)/$(CONFIG)/test_cpp_util_time_test
@@ -1649,7 +1648,6 @@ buildtests_cxx: privatelibs_cxx \
16491648
$(BINDIR)/$(CONFIG)/status_util_test \
16501649
$(BINDIR)/$(CONFIG)/streaming_throughput_test \
16511650
$(BINDIR)/$(CONFIG)/string_ref_test \
1652-
$(BINDIR)/$(CONFIG)/string_view_test \
16531651
$(BINDIR)/$(CONFIG)/test_cpp_client_credentials_test \
16541652
$(BINDIR)/$(CONFIG)/test_cpp_util_slice_test \
16551653
$(BINDIR)/$(CONFIG)/test_cpp_util_time_test \
@@ -1806,7 +1804,6 @@ buildtests_cxx: privatelibs_cxx \
18061804
$(BINDIR)/$(CONFIG)/status_util_test \
18071805
$(BINDIR)/$(CONFIG)/streaming_throughput_test \
18081806
$(BINDIR)/$(CONFIG)/string_ref_test \
1809-
$(BINDIR)/$(CONFIG)/string_view_test \
18101807
$(BINDIR)/$(CONFIG)/test_cpp_client_credentials_test \
18111808
$(BINDIR)/$(CONFIG)/test_cpp_util_slice_test \
18121809
$(BINDIR)/$(CONFIG)/test_cpp_util_time_test \
@@ -2335,8 +2332,6 @@ test_cxx: buildtests_cxx
23352332
$(Q) $(BINDIR)/$(CONFIG)/streaming_throughput_test || ( echo test streaming_throughput_test failed ; exit 1 )
23362333
$(E) "[RUN] Testing string_ref_test"
23372334
$(Q) $(BINDIR)/$(CONFIG)/string_ref_test || ( echo test string_ref_test failed ; exit 1 )
2338-
$(E) "[RUN] Testing string_view_test"
2339-
$(Q) $(BINDIR)/$(CONFIG)/string_view_test || ( echo test string_view_test failed ; exit 1 )
23402335
$(E) "[RUN] Testing test_cpp_client_credentials_test"
23412336
$(Q) $(BINDIR)/$(CONFIG)/test_cpp_client_credentials_test || ( echo test test_cpp_client_credentials_test failed ; exit 1 )
23422337
$(E) "[RUN] Testing test_cpp_util_slice_test"
@@ -18197,49 +18192,6 @@ endif
1819718192
endif
1819818193

1819918194

18200-
STRING_VIEW_TEST_SRC = \
18201-
test/core/gprpp/string_view_test.cc \
18202-
18203-
STRING_VIEW_TEST_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(STRING_VIEW_TEST_SRC))))
18204-
ifeq ($(NO_SECURE),true)
18205-
18206-
# You can't build secure targets if you don't have OpenSSL.
18207-
18208-
$(BINDIR)/$(CONFIG)/string_view_test: openssl_dep_error
18209-
18210-
else
18211-
18212-
18213-
18214-
18215-
ifeq ($(NO_PROTOBUF),true)
18216-
18217-
# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+.
18218-
18219-
$(BINDIR)/$(CONFIG)/string_view_test: protobuf_dep_error
18220-
18221-
else
18222-
18223-
$(BINDIR)/$(CONFIG)/string_view_test: $(PROTOBUF_DEP) $(STRING_VIEW_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libaddress_sorting.a $(LIBDIR)/$(CONFIG)/libupb.a
18224-
$(E) "[LD] Linking $@"
18225-
$(Q) mkdir -p `dirname $@`
18226-
$(Q) $(LDXX) $(LDFLAGS) $(STRING_VIEW_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libaddress_sorting.a $(LIBDIR)/$(CONFIG)/libupb.a $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) $(LDLIBS_SECURE) $(GTEST_LIB) -o $(BINDIR)/$(CONFIG)/string_view_test
18227-
18228-
endif
18229-
18230-
endif
18231-
18232-
$(OBJDIR)/$(CONFIG)/test/core/gprpp/string_view_test.o: $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libaddress_sorting.a $(LIBDIR)/$(CONFIG)/libupb.a
18233-
18234-
deps_string_view_test: $(STRING_VIEW_TEST_OBJS:.o=.dep)
18235-
18236-
ifneq ($(NO_SECURE),true)
18237-
ifneq ($(NO_DEPS),true)
18238-
-include $(STRING_VIEW_TEST_OBJS:.o=.dep)
18239-
endif
18240-
endif
18241-
18242-
1824318195
TEST_CPP_CLIENT_CREDENTIALS_TEST_SRC = \
1824418196
test/cpp/client/credentials_test.cc \
1824518197

build_autogenerated.yaml

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,6 @@ libs:
302302
- src/core/lib/gprpp/map.h
303303
- src/core/lib/gprpp/memory.h
304304
- src/core/lib/gprpp/mpscq.h
305-
- src/core/lib/gprpp/string_view.h
306305
- src/core/lib/gprpp/sync.h
307306
- src/core/lib/gprpp/thd.h
308307
- src/core/lib/profiling/timers.h
@@ -7241,19 +7240,6 @@ targets:
72417240
- address_sorting
72427241
- upb
72437242
uses_polling: false
7244-
- name: string_view_test
7245-
gtest: true
7246-
build: test
7247-
language: c++
7248-
headers: []
7249-
src:
7250-
- test/core/gprpp/string_view_test.cc
7251-
deps:
7252-
- grpc_test_util
7253-
- grpc
7254-
- gpr
7255-
- address_sorting
7256-
- upb
72577243
- name: test_cpp_client_credentials_test
72587244
gtest: true
72597245
build: test

gRPC-C++.podspec

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -425,7 +425,6 @@ Pod::Spec.new do |s|
425425
'src/core/lib/gprpp/orphanable.h',
426426
'src/core/lib/gprpp/ref_counted.h',
427427
'src/core/lib/gprpp/ref_counted_ptr.h',
428-
'src/core/lib/gprpp/string_view.h',
429428
'src/core/lib/gprpp/sync.h',
430429
'src/core/lib/gprpp/thd.h',
431430
'src/core/lib/http/format_request.h',
@@ -875,7 +874,6 @@ Pod::Spec.new do |s|
875874
'src/core/lib/gprpp/orphanable.h',
876875
'src/core/lib/gprpp/ref_counted.h',
877876
'src/core/lib/gprpp/ref_counted_ptr.h',
878-
'src/core/lib/gprpp/string_view.h',
879877
'src/core/lib/gprpp/sync.h',
880878
'src/core/lib/gprpp/thd.h',
881879
'src/core/lib/http/format_request.h',

gRPC-Core.podspec

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -618,7 +618,6 @@ Pod::Spec.new do |s|
618618
'src/core/lib/gprpp/orphanable.h',
619619
'src/core/lib/gprpp/ref_counted.h',
620620
'src/core/lib/gprpp/ref_counted_ptr.h',
621-
'src/core/lib/gprpp/string_view.h',
622621
'src/core/lib/gprpp/sync.h',
623622
'src/core/lib/gprpp/thd.h',
624623
'src/core/lib/gprpp/thd_posix.cc',
@@ -1231,7 +1230,6 @@ Pod::Spec.new do |s|
12311230
'src/core/lib/gprpp/orphanable.h',
12321231
'src/core/lib/gprpp/ref_counted.h',
12331232
'src/core/lib/gprpp/ref_counted_ptr.h',
1234-
'src/core/lib/gprpp/string_view.h',
12351233
'src/core/lib/gprpp/sync.h',
12361234
'src/core/lib/gprpp/thd.h',
12371235
'src/core/lib/http/format_request.h',

grpc.gemspec

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -540,7 +540,6 @@ Gem::Specification.new do |s|
540540
s.files += %w( src/core/lib/gprpp/orphanable.h )
541541
s.files += %w( src/core/lib/gprpp/ref_counted.h )
542542
s.files += %w( src/core/lib/gprpp/ref_counted_ptr.h )
543-
s.files += %w( src/core/lib/gprpp/string_view.h )
544543
s.files += %w( src/core/lib/gprpp/sync.h )
545544
s.files += %w( src/core/lib/gprpp/thd.h )
546545
s.files += %w( src/core/lib/gprpp/thd_posix.cc )

package.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -520,7 +520,6 @@
520520
<file baseinstalldir="/" name="src/core/lib/gprpp/orphanable.h" role="src" />
521521
<file baseinstalldir="/" name="src/core/lib/gprpp/ref_counted.h" role="src" />
522522
<file baseinstalldir="/" name="src/core/lib/gprpp/ref_counted_ptr.h" role="src" />
523-
<file baseinstalldir="/" name="src/core/lib/gprpp/string_view.h" role="src" />
524523
<file baseinstalldir="/" name="src/core/lib/gprpp/sync.h" role="src" />
525524
<file baseinstalldir="/" name="src/core/lib/gprpp/thd.h" role="src" />
526525
<file baseinstalldir="/" name="src/core/lib/gprpp/thd_posix.cc" role="src" />

src/core/ext/filters/client_channel/backend_metric.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222

2323
#include "udpa/data/orca/v1/orca_load_report.upb.h"
2424

25+
#include "src/core/lib/gprpp/map.h"
26+
2527
namespace grpc_core {
2628

2729
namespace {

0 commit comments

Comments
 (0)