Skip to content

Commit 0981686

Browse files
honglookercopybara-github
authored andcommitted
hpb: move repeated_field_iterator and repeated_field_iterator_test to hpb/backend/upb
PiperOrigin-RevId: 785499458
1 parent d311ef3 commit 0981686

File tree

5 files changed

+33
-21
lines changed

5 files changed

+33
-21
lines changed

hpb/BUILD

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77

88
load("@bazel_skylib//rules:common_settings.bzl", "string_flag")
99
load("@rules_cc//cc:cc_library.bzl", "cc_library")
10-
load("@rules_cc//cc:cc_test.bzl", "cc_test")
1110
load(
1211
"//hpb/bazel:hpb_proto_library.bzl",
1312
"hpb_proto_library_copts",
@@ -95,14 +94,14 @@ cc_library(
9594
name = "repeated_field",
9695
hdrs = [
9796
"repeated_field.h",
98-
"repeated_field_iterator.h",
9997
],
10098
copts = UPB_DEFAULT_CPPOPTS,
10199
visibility = ["//visibility:public"],
102100
deps = [
103101
":hpb",
104102
":ptr",
105103
"//hpb/backend/upb:interop",
104+
"//hpb/backend/upb:repeated_field_iterator",
106105
"//hpb/internal:template_help",
107106
"//upb/base",
108107
"//upb/mem",
@@ -134,23 +133,6 @@ hpb_proto_library_copts(
134133
visibility = ["//hpb/bazel:__pkg__"],
135134
)
136135

137-
cc_test(
138-
name = "repeated_field_iterator_test",
139-
srcs = ["repeated_field_iterator_test.cc"],
140-
deps = [
141-
":arena",
142-
":hpb",
143-
":repeated_field",
144-
"//hpb/backend/upb:interop",
145-
"//upb/base",
146-
"//upb/mem",
147-
"//upb/message",
148-
"@abseil-cpp//absl/strings:string_view",
149-
"@googletest//:gtest",
150-
"@googletest//:gtest_main",
151-
],
152-
)
153-
154136
cc_library(
155137
name = "requires",
156138
hdrs = ["requires.h"],

hpb/backend/upb/BUILD

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,3 +86,33 @@ cc_library(
8686
"@abseil-cpp//absl/strings:string_view",
8787
],
8888
)
89+
90+
cc_library(
91+
name = "repeated_field_iterator",
92+
hdrs = ["repeated_field_iterator.h"],
93+
visibility = ["//hpb:__subpackages__"],
94+
deps = [
95+
":interop",
96+
"//hpb",
97+
"//upb/base",
98+
"//upb/mem",
99+
"//upb/message",
100+
"@abseil-cpp//absl/strings:string_view",
101+
],
102+
)
103+
104+
cc_test(
105+
name = "repeated_field_iterator_test",
106+
srcs = ["repeated_field_iterator_test.cc"],
107+
deps = [
108+
":interop",
109+
":repeated_field_iterator",
110+
"//hpb:arena",
111+
"//upb/base",
112+
"//upb/mem",
113+
"//upb/message",
114+
"@abseil-cpp//absl/strings:string_view",
115+
"@googletest//:gtest",
116+
"@googletest//:gtest_main",
117+
],
118+
)

hpb/repeated_field_iterator_test.cc renamed to hpb/backend/upb/repeated_field_iterator_test.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
// license that can be found in the LICENSE file or at
66
// https://developers.google.com/open-source/licenses/bsd
77

8-
#include "hpb/repeated_field_iterator.h"
8+
#include "hpb/backend/upb/repeated_field_iterator.h"
99

1010
#include <algorithm>
1111
#include <array>

hpb/repeated_field.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@
1616

1717
#include "absl/strings/string_view.h"
1818
#include "hpb/backend/upb/interop.h"
19+
#include "hpb/backend/upb/repeated_field_iterator.h"
1920
#include "hpb/internal/template_help.h"
2021
#include "hpb/ptr.h"
21-
#include "hpb/repeated_field_iterator.h"
2222
#include "upb/base/string_view.h"
2323
#include "upb/mem/arena.h"
2424
#include "upb/message/array.h"

0 commit comments

Comments
 (0)