clang
20.0.0git
include
clang
Basic
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
18
namespace
clang
{
19
20
enum class
CFBranchLabelSchemeKind
{
21
Default
,
22
#define CF_BRANCH_LABEL_SCHEME(Kind, FlagVal) Kind,
23
#include "clang/Basic/CFProtectionOptions.def"
24
};
25
26
static
inline
const
char
*
27
getCFBranchLabelSchemeFlagVal
(
const
CFBranchLabelSchemeKind
Scheme) {
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
clang
The JSON file list parser is used to communicate input to InstallAPI.
Definition:
CalledOnceCheck.h:17
clang::StructuralEquivalenceKind::Default
@ Default
clang::CFBranchLabelSchemeKind
CFBranchLabelSchemeKind
Definition:
CFProtectionOptions.h:20
clang::getCFBranchLabelSchemeFlagVal
static const char * getCFBranchLabelSchemeFlagVal(const CFBranchLabelSchemeKind Scheme)
Definition:
CFProtectionOptions.h:27
Generated on Wed Feb 19 2025 16:05:58 for clang by
1.9.6