From 166de4b6f3ff4a5c78811d8ded338e50daa87f18 Mon Sep 17 00:00:00 2001 From: theWangs <1428148408@qq.com> Date: Wed, 21 May 2025 15:55:18 +0800 Subject: [PATCH] =?UTF-8?q?port=E7=9B=AE=E5=BD=95=E6=96=B0=E5=A2=9Elang.h?= =?UTF-8?q?=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- storage/rocksdb/rocksdb/port/lang.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 storage/rocksdb/rocksdb/port/lang.h diff --git a/storage/rocksdb/rocksdb/port/lang.h b/storage/rocksdb/rocksdb/port/lang.h new file mode 100644 index 000000000..a5fd36490 --- /dev/null +++ b/storage/rocksdb/rocksdb/port/lang.h @@ -0,0 +1,16 @@ +// Copyright (c) 2011-present, Facebook, Inc. All rights reserved. +// This source code is licensed under both the GPLv2 (found in the +// COPYING file in the root directory) and Apache 2.0 License +// (found in the LICENSE.Apache file in the root directory). + +#pragma once + +#ifndef FALLTHROUGH_INTENDED +#if defined(__clang__) +#define FALLTHROUGH_INTENDED [[clang::fallthrough]] +#elif defined(__GNUC__) && __GNUC__ >= 7 +#define FALLTHROUGH_INTENDED [[gnu::fallthrough]] +#else +#define FALLTHROUGH_INTENDED do {} while (0) +#endif +#endif -- Gitee