From f240af0cb81be776539b799aec45fdde0e48d68b Mon Sep 17 00:00:00 2001 From: Yash Tibrewal Date: Mon, 5 Nov 2018 13:56:06 -0800 Subject: [PATCH 1/2] Add GPR_CODEGEN_DEBUG_ASSERT --- include/grpcpp/impl/codegen/core_codegen_interface.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/include/grpcpp/impl/codegen/core_codegen_interface.h b/include/grpcpp/impl/codegen/core_codegen_interface.h index 25e3abccca5..c70afe876d8 100644 --- a/include/grpcpp/impl/codegen/core_codegen_interface.h +++ b/include/grpcpp/impl/codegen/core_codegen_interface.h @@ -19,6 +19,8 @@ #ifndef GRPCPP_IMPL_CODEGEN_CORE_CODEGEN_INTERFACE_H #define GRPCPP_IMPL_CODEGEN_CORE_CODEGEN_INTERFACE_H +#include + #include #include #include @@ -145,6 +147,15 @@ extern CoreCodegenInterface* g_core_codegen_interface; } \ } while (0) +/// Codegen specific version of \a GPR_DEBUG_ASSERT. +#ifndef NDEBUG +#define GPR_CODEGEN_DEBUG_ASSERT(x) GPR_CODEGEN_ASSERT(x) +#else +#define GPR_CODEGEN_DEBUG_ASSERT(x) \ + do { \ + } while (0) +#endif + } // namespace grpc #endif // GRPCPP_IMPL_CODEGEN_CORE_CODEGEN_INTERFACE_H From f055c1cfd2cdc22d4a75adecaff26cf50197d808 Mon Sep 17 00:00:00 2001 From: Yash Tibrewal Date: Mon, 5 Nov 2018 14:35:55 -0800 Subject: [PATCH 2/2] Remove unnecessary header --- include/grpcpp/impl/codegen/core_codegen_interface.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/include/grpcpp/impl/codegen/core_codegen_interface.h b/include/grpcpp/impl/codegen/core_codegen_interface.h index c70afe876d8..20a5b3300c4 100644 --- a/include/grpcpp/impl/codegen/core_codegen_interface.h +++ b/include/grpcpp/impl/codegen/core_codegen_interface.h @@ -19,8 +19,6 @@ #ifndef GRPCPP_IMPL_CODEGEN_CORE_CODEGEN_INTERFACE_H #define GRPCPP_IMPL_CODEGEN_CORE_CODEGEN_INTERFACE_H -#include - #include #include #include