clang: lib/Basic/XRayInstr.cpp Source File (original) (raw)

1

2

3

4

5

6

7

8

9

10

11

12

14#include "llvm/ADT/SmallVector.h"

15#include "llvm/ADT/StringSwitch.h"

16

18

21 llvm::StringSwitch(Value)

24 .Case("function",

31 return ParsedKind;

32}

33

37 Values.push_back("all");

38 return;

39 }

40

42 Values.push_back("none");

43 return;

44 }

45

47 Values.push_back("custom");

48

50 Values.push_back("typed");

51

54 Values.push_back("function");

56 Values.push_back("function-entry");

58 Values.push_back("function-exit");

59}

60}

Defines the clang::XRayInstrKind enum.

constexpr XRayInstrMask Typed

constexpr XRayInstrMask FunctionExit

constexpr XRayInstrMask None

constexpr XRayInstrMask FunctionEntry

constexpr XRayInstrMask All

constexpr XRayInstrMask Custom

The JSON file list parser is used to communicate input to InstallAPI.

XRayInstrMask parseXRayInstrValue(StringRef Value)

Parses a command line argument into a mask.

void serializeXRayInstrValue(XRayInstrSet Set, SmallVectorImpl< StringRef > &Values)

Serializes a set into a list of command line arguments.