1 // Protocol Buffers - Google's data interchange format 2 // Copyright 2023 Google Inc. All rights reserved. 3 // 4 // Use of this source code is governed by a BSD-style 5 // license that can be found in the LICENSE file or at 6 // https://developers.google.com/open-source/licenses/bsd 7 8 #include "google/protobuf/reflection_mode.h" 9 10 // Must be included last. 11 #include "google/protobuf/port_def.inc" 12 13 namespace google { 14 namespace protobuf { 15 namespace internal { 16 17 #if !defined(PROTOBUF_NO_THREADLOCAL) 18 19 #if defined(PROTOBUF_USE_DLLS) && defined(_WIN32) reflection_mode()20ReflectionMode& ScopedReflectionMode::reflection_mode() { 21 static PROTOBUF_THREAD_LOCAL ReflectionMode reflection_mode = 22 ReflectionMode::kDefault; 23 return reflection_mode; 24 } 25 #else 26 PROTOBUF_CONSTINIT PROTOBUF_THREAD_LOCAL ReflectionMode 27 ScopedReflectionMode::reflection_mode_ = ReflectionMode::kDefault; 28 #endif 29 30 #endif 31 32 } // namespace internal 33 } // namespace protobuf 34 } // namespace google 35 36 #include "google/protobuf/port_undef.inc" 37