From 61967e84dd6b33d138ed311a59a5c75ca4348c21 Mon Sep 17 00:00:00 2001 From: Eric Salo Date: Wed, 16 Aug 2023 18:10:22 -0700 Subject: [PATCH] upb: delete upb/upb.h PiperOrigin-RevId: 557659890 --- BUILD | 2 -- upb/message/accessors_test.cc | 1 - upb/message/promote_test.cc | 1 - upb/upb.h | 42 ----------------------------------- upb/util/BUILD | 2 +- upb/util/compare.c | 4 ++-- 6 files changed, 3 insertions(+), 49 deletions(-) delete mode 100644 upb/upb.h diff --git a/BUILD b/BUILD index 7ae2b56111..c05750195b 100644 --- a/BUILD +++ b/BUILD @@ -111,7 +111,6 @@ cc_library( hdrs = [ "upb/message/internal/extension.h", "upb/message/message.h", - "upb/upb.h", "upb/upb.hpp", ], copts = UPB_DEFAULT_COPTS, @@ -288,7 +287,6 @@ cc_library( ], copts = UPB_DEFAULT_COPTS, visibility = ["//visibility:public"], - deps = [], ) cc_test( diff --git a/upb/message/accessors_test.cc b/upb/message/accessors_test.cc index ff1c562cdb..44674886d7 100644 --- a/upb/message/accessors_test.cc +++ b/upb/message/accessors_test.cc @@ -47,7 +47,6 @@ #include "upb/mini_descriptor/internal/encode.hpp" #include "upb/mini_descriptor/internal/modifiers.h" #include "upb/test/test.upb.h" -#include "upb/upb.h" #include "upb/wire/common.h" #include "upb/wire/decode.h" diff --git a/upb/message/promote_test.cc b/upb/message/promote_test.cc index 6e8faadd48..ae114302dc 100644 --- a/upb/message/promote_test.cc +++ b/upb/message/promote_test.cc @@ -48,7 +48,6 @@ #include "upb/mini_descriptor/internal/encode.hpp" #include "upb/mini_descriptor/internal/modifiers.h" #include "upb/test/test.upb.h" -#include "upb/upb.h" #include "upb/upb.hpp" #include "upb/wire/common.h" #include "upb/wire/decode.h" diff --git a/upb/upb.h b/upb/upb.h deleted file mode 100644 index 2c70c2f0a0..0000000000 --- a/upb/upb.h +++ /dev/null @@ -1,42 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2023 Google LLC. All rights reserved. -// https://developers.google.com/protocol-buffers/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google LLC nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// This header is deprecated, use the individual #includes below as needed. -// IWYU pragma: private, include "upb/base/status.h" - -#ifndef UPB_H_ -#define UPB_H_ - -#include "upb/base/descriptor_constants.h" -#include "upb/base/status.h" -#include "upb/base/string_view.h" -#include "upb/mem/arena.h" - -#endif /* UPB_H_ */ diff --git a/upb/util/BUILD b/upb/util/BUILD index 6a54c2bb0c..e3f7ec7766 100644 --- a/upb/util/BUILD +++ b/upb/util/BUILD @@ -140,9 +140,9 @@ cc_library( hdrs = ["compare.h"], visibility = ["//visibility:public"], deps = [ + "//:base", "//:eps_copy_input_stream", "//:port", - "//:upb", "//:wire_reader", "//:wire_types", ], diff --git a/upb/util/compare.c b/upb/util/compare.c index 8cdd3134a9..b96b94d532 100644 --- a/upb/util/compare.c +++ b/upb/util/compare.c @@ -32,7 +32,7 @@ #include -#include "upb/upb.h" +#include "upb/base/string_view.h" #include "upb/wire/eps_copy_input_stream.h" #include "upb/wire/reader.h" #include "upb/wire/types.h" @@ -218,7 +218,7 @@ static upb_UnknownFields* upb_UnknownFields_Build(upb_UnknownField_Context* ctx, return fields; } -// Compares two sorted upb_UnknwonFields structures for equality. +// Compares two sorted upb_UnknownFields structures for equality. static bool upb_UnknownFields_IsEqual(const upb_UnknownFields* uf1, const upb_UnknownFields* uf2) { if (uf1->size != uf2->size) return false;