diff options
Diffstat (limited to 'clang/lib')
-rw-r--r-- | clang/lib/Driver/XRayArgs.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/clang/lib/Driver/XRayArgs.cpp b/clang/lib/Driver/XRayArgs.cpp index 527fc3c9558..a2023289753 100644 --- a/clang/lib/Driver/XRayArgs.cpp +++ b/clang/lib/Driver/XRayArgs.cpp @@ -215,4 +215,19 @@ void XRayArgs::addArgs(const ToolChain &TC, const ArgList &Args, ModeOpt += Mode; CmdArgs.push_back(Args.MakeArgString(ModeOpt)); } + + SmallString<64> Bundle("-fxray-instrumentation-bundle="); + if (InstrumentationBundle.full()) { + Bundle += "all"; + } else if (InstrumentationBundle.empty()) { + Bundle += "none"; + } else { + if (InstrumentationBundle.has(XRayInstrKind::Function)) + Bundle += "function"; + if (InstrumentationBundle.has(XRayInstrKind::Custom)) + Bundle += "custom"; + if (InstrumentationBundle.has(XRayInstrKind::Typed)) + Bundle += "typed"; + } + CmdArgs.push_back(Args.MakeArgString(Bundle)); } |