The function attributes xray-skip-entry, xray-skip-exit, and
xray-ignore-loops were only being applied if a function had an
xray-instrument attribute, but they should apply if xray is enabled
globally too.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
clang/lib/Frontend/CompilerInvocation.cpp | ||
---|---|---|
1102 | Args.hasArg(OPT_fxray_ignore_loops); There is no need to check a fno option in cc1, if the option is always enabled/disabled by default. |
clang/lib/CodeGen/CodeGenFunction.cpp | ||
---|---|---|
832 | @hiraditya I realize on a previous diff you suggested dropping the brackets. I'll do that here too. | |
clang/lib/Frontend/CompilerInvocation.cpp | ||
1102 | Will update. |
Is it worth adding a test that a function with an explicit xray-instrument attribute also has these other attributes applied?
clang/test/CodeGen/xray-attributes-skip-entry-exit.cpp | ||
---|---|---|
9 | I don't see the NOCUSTOM or NOTYPED prefixes defined? | |
13 | Same with the FUNCTION prefix. | |
clang/test/CodeGen/xray-ignore-loops.cpp | ||
2 | From what I've seen, CodeGen tests don't usually invoke the driver directly. They have a test that the driver passes the correct flags to cc1 (as you do below), and then they just test that cc1 does the right thing with that flag. |
The existing tests from when the feature was added covered that case well. It was the driver passing the flag and the case without the xray-instrument attribute that weren't working.
@hiraditya I realize on a previous diff you suggested dropping the brackets. I'll do that here too.