Coverage Report

Created: 2019-07-24 05:18

/Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/llvm/tools/clang/lib/Basic/XRayInstr.cpp
Line
Count
Source
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
18
XRayInstrMask parseXRayInstrValue(StringRef Value) {
19
18
  XRayInstrMask ParsedKind = llvm::StringSwitch<XRayInstrMask>(Value)
20
18
                                 .Case("all", XRayInstrKind::All)
21
18
                                 .Case("custom", XRayInstrKind::Custom)
22
18
                                 .Case("function", XRayInstrKind::Function)
23
18
                                 .Case("typed", XRayInstrKind::Typed)
24
18
                                 .Case("none", XRayInstrKind::None)
25
18
                                 .Default(XRayInstrKind::None);
26
18
  return ParsedKind;
27
18
}
28
29
} // namespace clang