Skip to content

Commit d70fa0d

Browse files
hyeontaekcopybara-github
authored andcommitted
[TSL] Export protobuf includes in tsl/platform/protobuf.h
These includes are forwarding the content of header files to those that includes `tsl/platform/protobuf.h`. Thus, they should be marked using `export` rather than `keep`. This makes the user code of `tsl/platform/protobuf.h` not attempt to remove the include. PiperOrigin-RevId: 868804207
1 parent 16f1f97 commit d70fa0d

File tree

1 file changed

+20
-18
lines changed

1 file changed

+20
-18
lines changed

tsl/platform/protobuf.h

Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -30,24 +30,26 @@ limitations under the License.
3030
// TensorFlow code should use the ::tensorflow::protobuf namespace to
3131
// refer to all protobuf APIs.
3232

33-
#include "google/protobuf/descriptor.pb.h" // IWYU pragma: keep
34-
#include "google/protobuf/arena.h" // IWYU pragma: keep
35-
#include "google/protobuf/descriptor.h" // IWYU pragma: keep
36-
#include "google/protobuf/dynamic_message.h" // IWYU pragma: keep
37-
#include "google/protobuf/io/coded_stream.h" // IWYU pragma: keep
38-
#include "google/protobuf/io/tokenizer.h" // IWYU pragma: keep
39-
#include "google/protobuf/io/zero_copy_stream.h" // IWYU pragma: keep
40-
#include "google/protobuf/io/zero_copy_stream_impl_lite.h" // IWYU pragma: keep
41-
#include "google/protobuf/map.h" // IWYU pragma: keep
42-
#include "google/protobuf/message.h" // IWYU pragma: keep
43-
#include "google/protobuf/repeated_field.h" // IWYU pragma: keep
44-
#include "google/protobuf/repeated_ptr_field.h" // IWYU pragma: keep
45-
#include "google/protobuf/text_format.h" // IWYU pragma: keep
46-
#include "google/protobuf/util/delimited_message_util.h" // IWYU pragma: keep
47-
#include "google/protobuf/util/field_comparator.h" // IWYU pragma: keep
48-
#include "google/protobuf/util/json_util.h" // IWYU pragma: keep
49-
#include "google/protobuf/util/message_differencer.h" // IWYU pragma: keep
50-
#include "google/protobuf/util/type_resolver_util.h" // IWYU pragma: keep
33+
// IWYU pragma: begin_exports
34+
#include "google/protobuf/descriptor.pb.h"
35+
#include "google/protobuf/arena.h"
36+
#include "google/protobuf/descriptor.h"
37+
#include "google/protobuf/dynamic_message.h"
38+
#include "google/protobuf/io/coded_stream.h"
39+
#include "google/protobuf/io/tokenizer.h"
40+
#include "google/protobuf/io/zero_copy_stream.h"
41+
#include "google/protobuf/io/zero_copy_stream_impl_lite.h"
42+
#include "google/protobuf/map.h"
43+
#include "google/protobuf/message.h"
44+
#include "google/protobuf/repeated_field.h"
45+
#include "google/protobuf/repeated_ptr_field.h"
46+
#include "google/protobuf/text_format.h"
47+
#include "google/protobuf/util/delimited_message_util.h"
48+
#include "google/protobuf/util/field_comparator.h"
49+
#include "google/protobuf/util/json_util.h"
50+
#include "google/protobuf/util/message_differencer.h"
51+
#include "google/protobuf/util/type_resolver_util.h"
52+
// IWYU pragma: end_exports
5153
#include "tsl/platform/tstring.h"
5254

5355
#if !TSL_IS_IN_OSS

0 commit comments

Comments
 (0)