hoy added inline comments.
================
Comment at: clang/lib/Driver/ToolChains/CommonArgs.cpp:609
+ // Pass an option to enable pseudo probe emission.
+ if (Args.hasArg(options::OPT_fpseudo_probe_for_profiling))
+ CmdArgs.push_back("-plugin-opt=pseudo-probe-for-profiling");
----------------
wenlei wrote:
> `getLastArg(options::OPT_fpseudo_probe_for_profiling,
> options::OPT_fno_pseudo_probe_for_profiling` instead?
Good point, changed to
```
Args.hasFlag(options::OPT_fpseudo_probe_for_profiling,
options::OPT_fno_pseudo_probe_for_profiling)
```
which matches the last positive flag
```
bool ArgList::hasFlag(OptSpecifier Pos, OptSpecifier Neg, bool Default) const {
if (Arg *A = getLastArg(Pos, Neg))
return A->getOption().matches(Pos);
return Default;
}
```
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D95271/new/
https://reviews.llvm.org/D95271
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits