clang 20.0.0git
CFProtectionOptions.h
Go to the documentation of this file.
1//===--- CFProtectionOptions.h ----------------------------------*- C++ -*-===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8//
9// This file defines constants for -fcf-protection and other related flags.
10//
11//===----------------------------------------------------------------------===//
12
13#ifndef LLVM_CLANG_BASIC_CFPROTECTIONOPTIONS_H
14#define LLVM_CLANG_BASIC_CFPROTECTIONOPTIONS_H
15
16#include "llvm/Support/ErrorHandling.h"
17
18namespace clang {
19
21 Default,
22#define CF_BRANCH_LABEL_SCHEME(Kind, FlagVal) Kind,
23#include "clang/Basic/CFProtectionOptions.def"
24};
25
26static inline const char *
28#define CF_BRANCH_LABEL_SCHEME(Kind, FlagVal) \
29 if (Scheme == CFBranchLabelSchemeKind::Kind) \
30 return #FlagVal;
31#include "clang/Basic/CFProtectionOptions.def"
32
33 llvm::report_fatal_error("invalid scheme");
34}
35
36} // namespace clang
37
38#endif // #ifndef LLVM_CLANG_BASIC_CFPROTECTIONOPTIONS_H
The JSON file list parser is used to communicate input to InstallAPI.
static const char * getCFBranchLabelSchemeFlagVal(const CFBranchLabelSchemeKind Scheme)