summaryrefslogtreecommitdiff
path: root/clang/lib/Basic/XRayInstr.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2020-07-26 19:36:28 +0000
committerDimitry Andric <dim@FreeBSD.org>2020-07-26 19:36:28 +0000
commitcfca06d7963fa0909f90483b42a6d7d194d01e08 (patch)
tree209fb2a2d68f8f277793fc8df46c753d31bc853b /clang/lib/Basic/XRayInstr.cpp
parent706b4fc47bbc608932d3b491ae19a3b9cde9497b (diff)
Notes
Diffstat (limited to 'clang/lib/Basic/XRayInstr.cpp')
-rw-r--r--clang/lib/Basic/XRayInstr.cpp18
1 files changed, 11 insertions, 7 deletions
diff --git a/clang/lib/Basic/XRayInstr.cpp b/clang/lib/Basic/XRayInstr.cpp
index ef2470f67200..79052e05860e 100644
--- a/clang/lib/Basic/XRayInstr.cpp
+++ b/clang/lib/Basic/XRayInstr.cpp
@@ -16,13 +16,17 @@
namespace clang {
XRayInstrMask parseXRayInstrValue(StringRef Value) {
- XRayInstrMask ParsedKind = llvm::StringSwitch<XRayInstrMask>(Value)
- .Case("all", XRayInstrKind::All)
- .Case("custom", XRayInstrKind::Custom)
- .Case("function", XRayInstrKind::Function)
- .Case("typed", XRayInstrKind::Typed)
- .Case("none", XRayInstrKind::None)
- .Default(XRayInstrKind::None);
+ XRayInstrMask ParsedKind =
+ llvm::StringSwitch<XRayInstrMask>(Value)
+ .Case("all", XRayInstrKind::All)
+ .Case("custom", XRayInstrKind::Custom)
+ .Case("function",
+ XRayInstrKind::FunctionEntry | XRayInstrKind::FunctionExit)
+ .Case("function-entry", XRayInstrKind::FunctionEntry)
+ .Case("function-exit", XRayInstrKind::FunctionExit)
+ .Case("typed", XRayInstrKind::Typed)
+ .Case("none", XRayInstrKind::None)
+ .Default(XRayInstrKind::None);
return ParsedKind;
}