1 // Copyright (c) 2011-present, Facebook, Inc.  All rights reserved.
2 //  This source code is licensed under both the GPLv2 (found in the
3 //  COPYING file in the root directory) and Apache 2.0 License
4 //  (found in the LICENSE.Apache file in the root directory).
5 
6 #pragma once
7 
8 #ifndef FALLTHROUGH_INTENDED
9 #if defined(__clang__)
10 #define FALLTHROUGH_INTENDED [[clang::fallthrough]]
11 #elif defined(__GNUC__) && __GNUC__ >= 7
12 #define FALLTHROUGH_INTENDED [[gnu::fallthrough]]
13 #else
14 #define FALLTHROUGH_INTENDED do {} while (0)
15 #endif
16 #endif
17