From dbbe317b4fbcf16c3c0b63b6799abcb28b6d6ea5 Mon Sep 17 00:00:00 2001 From: Martijn Vels Date: Thu, 23 Mar 2023 13:10:28 -0700 Subject: [PATCH] Small optimization: move TcParser::Error() out of line PiperOrigin-RevId: 518943474 --- src/google/protobuf/generated_message_tctable_impl.h | 8 -------- src/google/protobuf/generated_message_tctable_lite.cc | 7 +++++++ 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/src/google/protobuf/generated_message_tctable_impl.h b/src/google/protobuf/generated_message_tctable_impl.h index 2551b7a73a..bf20515675 100644 --- a/src/google/protobuf/generated_message_tctable_impl.h +++ b/src/google/protobuf/generated_message_tctable_impl.h @@ -907,14 +907,6 @@ inline PROTOBUF_ALWAYS_INLINE const char* TcParser::ToParseLoop( return ptr; } -inline PROTOBUF_ALWAYS_INLINE const char* TcParser::Error( - PROTOBUF_TC_PARAM_NO_DATA_DECL) { - (void)ctx; - (void)ptr; - SyncHasbits(msg, hasbits, table); - return nullptr; -} - } // namespace internal } // namespace protobuf } // namespace google diff --git a/src/google/protobuf/generated_message_tctable_lite.cc b/src/google/protobuf/generated_message_tctable_lite.cc index cd6350049a..999d9d6806 100644 --- a/src/google/protobuf/generated_message_tctable_lite.cc +++ b/src/google/protobuf/generated_message_tctable_lite.cc @@ -269,6 +269,13 @@ absl::string_view TcParser::FieldName(const TcParseTableBase* table, field_index + 1); } +PROTOBUF_NOINLINE const char* TcParser::Error(PROTOBUF_TC_PARAM_NO_DATA_DECL) { + (void)ctx; + (void)ptr; + SyncHasbits(msg, hasbits, table); + return nullptr; +} + template inline PROTOBUF_ALWAYS_INLINE const char* TcParser::MiniParse( PROTOBUF_TC_PARAM_DECL) {