From f59c9a9c6b9fe0194d21115a83b554d4027a4669 Mon Sep 17 00:00:00 2001 From: Eric Anderson Date: Thu, 6 Aug 2020 08:18:40 -0700 Subject: [PATCH] compiler: Swap to ABSL_FALLTHROUGH_INTENDED FALLTHROUGH_INTENDED was defined by Abseil, but is now getting an ABSL prefix and the old name will be removed. Swapping to a new define name to avoid redefining the existing-but-soon-to-be-deleted FALLTHROUGH_INTENDED. --- compiler/src/java_plugin/cpp/java_generator.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/compiler/src/java_plugin/cpp/java_generator.cpp b/compiler/src/java_plugin/cpp/java_generator.cpp index 695ef8581b..7a883d2b84 100644 --- a/compiler/src/java_plugin/cpp/java_generator.cpp +++ b/compiler/src/java_plugin/cpp/java_generator.cpp @@ -37,8 +37,10 @@ #define XSTR(s) STR(s) #endif -#ifndef FALLTHROUGH_INTENDED -#define FALLTHROUGH_INTENDED +#ifdef ABSL_FALLTHROUGH_INTENDED +#define FALLTHROUGH ABSL_FALLTHROUGH_INTENDED +#else +#define FALLTHROUGH #endif namespace java_grpc_generator { @@ -542,7 +544,7 @@ static void PrintStub( break; case BLOCKING_CLIENT_INTERFACE: interface = true; - FALLTHROUGH_INTENDED; + FALLTHROUGH; case BLOCKING_CLIENT_IMPL: call_type = BLOCKING_CALL; stub_name += "BlockingStub"; @@ -551,7 +553,7 @@ static void PrintStub( break; case FUTURE_CLIENT_INTERFACE: interface = true; - FALLTHROUGH_INTENDED; + FALLTHROUGH; case FUTURE_CLIENT_IMPL: call_type = FUTURE_CALL; stub_name += "FutureStub";