From 2d39b703d02645076fead8fa409a1711f0e84381 Mon Sep 17 00:00:00 2001 From: Paul Wankadia Date: Fri, 30 Jun 2023 14:43:40 +0000 Subject: [PATCH] Clean up some StringPiece-related cruft. Change-Id: I6bf7ccda2b0a80b782f3fb3fe05ba79f77082e22 Reviewed-on: https://code-review.googlesource.com/c/re2/+/61490 Reviewed-by: Alex Chernyakhovsky Reviewed-by: Paul Wankadia --- libre2.symbols | 3 --- libre2.symbols.darwin | 3 --- re2/stringpiece.h | 10 ++-------- 3 files changed, 2 insertions(+), 14 deletions(-) diff --git a/libre2.symbols b/libre2.symbols index 93b71b486..0cab3d94b 100644 --- a/libre2.symbols +++ b/libre2.symbols @@ -3,9 +3,6 @@ # re2::RE2* _ZN3re23RE2*; _ZNK3re23RE2*; - # re2::StringPiece* - _ZN3re211StringPiece*; - _ZNK3re211StringPiece*; # re2::operator<<* _ZN3re2ls*; # re2::FilteredRE2* diff --git a/libre2.symbols.darwin b/libre2.symbols.darwin index 41ac96f93..754f45cd2 100644 --- a/libre2.symbols.darwin +++ b/libre2.symbols.darwin @@ -2,9 +2,6 @@ # re2::RE2* __ZN3re23RE2* __ZNK3re23RE2* -# re2::StringPiece* -__ZN3re211StringPiece* -__ZNK3re211StringPiece* # re2::operator<<* __ZN3re2ls* # re2::FilteredRE2* diff --git a/re2/stringpiece.h b/re2/stringpiece.h index 6d11d16a0..e9367bff3 100644 --- a/re2/stringpiece.h +++ b/re2/stringpiece.h @@ -9,14 +9,8 @@ namespace re2 { -// RE2 has two versions: "sans Abseil" in the main branch; and "avec Abseil" in -// the abseil branch. This has led to a diamond dependency problem for projects -// like Envoy: as per https://github.com/google/re2/issues/388, GoogleTest took -// a dependency on RE2 avec Abseil, but other things depend on RE2 sans Abseil. -// To resolve this conflict until both versions can migrate to std::string_view -// (C++17), those other things must be able to #include "re2/stringpiece.h" and -// use re2::StringPiece. (This is a hack, obviously, but it beats telling every -// project in this situation that they have to perform source transformations.) +// Until RE2 requires C++17 and uses std::string_view, allow users to +// continue to #include "re2/stringpiece.h" and use re2::StringPiece. using StringPiece = absl::string_view; } // namespace re2