clang 10.0.0git

XRayInstr.cpp
Go to the documentation of this file.
1 //===--- XRayInstr.cpp ------------------------------------------*- 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 is part of XRay, a function call instrumentation system.
10 //
11 //===----------------------------------------------------------------------===//
12
13 #include "clang/Basic/XRayInstr.h"
14 #include "llvm/ADT/StringSwitch.h"
15
16 namespace clang {
17
18 XRayInstrMask parseXRayInstrValue(StringRef Value) {
19 XRayInstrMask ParsedKind = llvm::StringSwitch<XRayInstrMask>(Value)
20 .Case("all", XRayInstrKind::All)
21 .Case("custom", XRayInstrKind::Custom)
22 .Case("function", XRayInstrKind::Function)
23 .Case("typed", XRayInstrKind::Typed)
24 .Case("none", XRayInstrKind::None)
25 .Default(XRayInstrKind::None);
26 return ParsedKind;
27 }
28
29 } // namespace clang
clang::XRayInstrKind::Typed
constexpr XRayInstrMask Typed
Definition: XRayInstr.h:40
clang::XRayInstrKind::Function
constexpr XRayInstrMask Function
Definition: XRayInstr.h:38
Value
Value
Definition: UninitializedValues.cpp:101
clang::XRayInstrKind::All
constexpr XRayInstrMask All
Definition: XRayInstr.h:41
XRayInstr.h
Defines the clang::XRayInstrKind enum.
clang::XRayInstrKind::Custom
constexpr XRayInstrMask Custom
Definition: XRayInstr.h:39
clang::XRayInstrKind::None
constexpr XRayInstrMask None
Definition: XRayInstr.h:37
clang
Dataflow Directional Tag Classes.
Definition: CFGReachabilityAnalysis.h:21
clang::XRayInstrMask
uint32_t XRayInstrMask
Definition: XRayInstr.h:25
clang::parseXRayInstrValue
XRayInstrMask parseXRayInstrValue(StringRef Value)
Definition: XRayInstr.cpp:18