As titled.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
clang/lib/Driver/ToolChains/CommonArgs.cpp | ||
---|---|---|
609 | getLastArg(options::OPT_fpseudo_probe_for_profiling, options::OPT_fno_pseudo_probe_for_profiling instead? |
clang/lib/Driver/ToolChains/CommonArgs.cpp | ||
---|---|---|
609 | 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; } |
clang/lib/Driver/ToolChains/CommonArgs.cpp | ||
---|---|---|
609–610 | The third arg of Args.hasFlag defaults to true, which means -plugin-opt=pseudo-probe-for-profiling will be inserted even if no -fpseudo-probe-for-profiling or -fno-pseudo-probe-for-profiling is provided. Is it expected? | |
clang/test/Driver/pseudo-probe-lto.c | ||
7 | Better add another check of NOPROBE when neither -fpseudo-probe-for-profiling or -fno-pseudo-probe-for-profiling is provided. |
clang/lib/Driver/ToolChains/CommonArgs.cpp | ||
---|---|---|
609–610 | Good catch, it's not expected. Thanks! |
clang/test/Driver/pseudo-probe-lto.c | ||
---|---|---|
7 | Good point, test case added. |
getLastArg(options::OPT_fpseudo_probe_for_profiling, options::OPT_fno_pseudo_probe_for_profiling instead?