This option behaves in a similar spirit as -save-temps and writes out
llvm statistics in json format.
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
include/clang/Basic/DiagnosticFrontendKinds.td | ||
---|---|---|
111 ↗ | (On Diff #72135) | statstic"s"? not sure. |
lib/Driver/Tools.cpp | ||
6093 ↗ | (On Diff #72135) | ditto :-) |
test/Driver/save-stats.c | ||
12 ↗ | (On Diff #72135) | This is up to taste, but just accepting {{.}} as the path separator would be sufficient IMO and might be more readable. |
lib/Driver/Tools.cpp | ||
---|---|---|
6102 ↗ | (On Diff #72135) | Why removing StatsFile here? IIUC, at this point StatsFile is still the same as the output (if it's a file). |
lib/Driver/Tools.cpp | ||
---|---|---|
6102 ↗ | (On Diff #72135) | a) It behaves like -save-temps=obj (clang -save-temps=obj foo.c -o bar will give you foo.i, foo.o, ...; |
Maybe add some docs to explain the new flags?
lib/Driver/Tools.cpp | ||
---|---|---|
6102 ↗ | (On Diff #72135) | Ok, I see now, I misread remove_filename as remove |
test/Driver/save-stats.c | ||
1 ↗ | (On Diff #72135) | Is -save-stats == -save-stats=cwd? It doesn't seem so by looking at lib/Driver/Tools.cpp. Need test for the diag::err_drv_invalid_value as well. |
12 ↗ | (On Diff #72135) | +1 to Adrian's suggestion |
test/Driver/save-stats.c | ||
---|---|---|
1 ↗ | (On Diff #72135) | Yes, that aspect is handled by the options parser, look at the changes in Options.td |
test/Driver/save-stats.c | ||
---|---|---|
12 ↗ | (On Diff #72135) | For the record: Switching to {{.}} in the final commit broke the windows bots, because they display an escaped slash here (= two backslash characters)... |