[PATCH] D87953: [xray] Function coverage groups
Fangrui Song via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sun Sep 20 11:26:21 PDT 2020
MaskRay added inline comments.
================
Comment at: clang/lib/CodeGen/CodeGenFunction.cpp:814
+ auto FuncGroups = CGM.getCodeGenOpts().XRayTotalFunctionGroups;
+ if (FuncGroups > 1) {
+ auto FuncName = ArrayRef<uint8_t>(CurFn->getName().bytes_begin(),
----------------
kyulee wrote:
> MaskRay wrote:
> > For one group, the branch is skipped, which does not seem correct
> Should we check or assert `XRaySelectedFunctionGroups > 0` && `XRaySelectedFunctionGroup < XRaySelectedFunctionGroups` or the former at minimum?
Such checks are usually done in Driver. In CodeGen, as long as it doesn't crash, there is no need imposing stricter checks.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D87953/new/
https://reviews.llvm.org/D87953
More information about the cfe-commits
mailing list