clang 8.0.0

XRayInstr.cpp
Go to the documentation of this file.
1 //===--- XRayInstr.cpp ------------------------------------------*- C++ -*-===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // This is part of XRay, a function call instrumentation system.
11 //
12 //===----------------------------------------------------------------------===//
13
14 #include "clang/Basic/XRayInstr.h"
15 #include "llvm/ADT/StringSwitch.h"
16
17 namespace clang {
18
19 XRayInstrMask parseXRayInstrValue(StringRef Value) {
20 XRayInstrMask ParsedKind = llvm::StringSwitch<XRayInstrMask>(Value)
21 .Case("all", XRayInstrKind::All)
22 .Case("custom", XRayInstrKind::Custom)
23 .Case("function", XRayInstrKind::Function)
24 .Case("typed", XRayInstrKind::Typed)
25 .Case("none", XRayInstrKind::None)
26 .Default(XRayInstrKind::None);
27 return ParsedKind;
28 }
29
30 } // namespace clang
clang::XRayInstrKind::Typed
constexpr XRayInstrMask Typed
Definition: XRayInstr.h:41
clang::XRayInstrKind::Function
constexpr XRayInstrMask Function
Definition: XRayInstr.h:39
Value
Value
Definition: UninitializedValues.cpp:102
clang::XRayInstrKind::All
constexpr XRayInstrMask All
Definition: XRayInstr.h:42
XRayInstr.h
Defines the clang::XRayInstrKind enum.
clang::XRayInstrKind::Custom
constexpr XRayInstrMask Custom
Definition: XRayInstr.h:40
clang::XRayInstrKind::None
constexpr XRayInstrMask None
Definition: XRayInstr.h:38
clang
Dataflow Directional Tag Classes.
Definition: CFGReachabilityAnalysis.h:22
clang::XRayInstrMask
uint32_t XRayInstrMask
Definition: XRayInstr.h:26
clang::parseXRayInstrValue
XRayInstrMask parseXRayInstrValue(StringRef Value)
Definition: XRayInstr.cpp:19