1 #include "caffe2/utils/proto_wrap.h" 2 3 C10_DIAGNOSTIC_PUSH_AND_IGNORED_IF_DEFINED("-Winconsistent-missing-override") 4 C10_DIAGNOSTIC_PUSH_AND_IGNORED_IF_DEFINED("-Winconsistent-missing-destructor-override") 5 C10_DIAGNOSTIC_PUSH_AND_IGNORED_IF_DEFINED("-Wsuggest-override") 6 C10_DIAGNOSTIC_PUSH_AND_IGNORED_IF_DEFINED("-Wdeprecated-dynamic-exception-spec") 7 #include <google/protobuf/stubs/common.h> 8 #include <google/protobuf/generated_message_util.h> 9 C10_DIAGNOSTIC_POP() 10 C10_DIAGNOSTIC_POP() 11 C10_DIAGNOSTIC_POP() 12 C10_DIAGNOSTIC_POP() 13 14 namespace ONNX_NAMESPACE { 15 16 // ONNX wrapper functions for protobuf's GetEmptyStringAlreadyInited() function 17 // used to avoid duplicated global variable in the case when protobuf 18 // is built with hidden visibility. GetEmptyStringAlreadyInited()19TORCH_API const ::std::string& GetEmptyStringAlreadyInited() { 20 return ::google::protobuf::internal::GetEmptyStringAlreadyInited(); 21 } 22 23 } // namespace ONNX_NAMESPACE 24 25 namespace caffe2 { 26 27 // Caffe2 wrapper functions for protobuf's GetEmptyStringAlreadyInited() function 28 // used to avoid duplicated global variable in the case when protobuf 29 // is built with hidden visibility. GetEmptyStringAlreadyInited()30TORCH_API const ::std::string& GetEmptyStringAlreadyInited() { 31 return ::google::protobuf::internal::GetEmptyStringAlreadyInited(); 32 } 33 ShutdownProtobufLibrary()34void ShutdownProtobufLibrary() { 35 ::google::protobuf::ShutdownProtobufLibrary(); 36 } 37 38 } // namespace caffe2 39 40 namespace torch { 41 42 // Caffe2 wrapper functions for protobuf's GetEmptyStringAlreadyInited() function 43 // used to avoid duplicated global variable in the case when protobuf 44 // is built with hidden visibility. GetEmptyStringAlreadyInited()45TORCH_API const ::std::string& GetEmptyStringAlreadyInited() { 46 return ::google::protobuf::internal::GetEmptyStringAlreadyInited(); 47 } 48 ShutdownProtobufLibrary()49void ShutdownProtobufLibrary() { 50 ::google::protobuf::ShutdownProtobufLibrary(); 51 } 52 53 } // namespace torch 54