The new PM needs to invoke add-discriminator pass when building with -fdebug-info-for-profiling.
Details
Diff Detail
- Build Status
Buildable 8482 Build 8482: arc lint + arc unit
Event Timeline
lib/CodeGen/BackendUtil.cpp | ||
---|---|---|
847–858 | -fprofile-generate, -fprofile-use and -fprofile-sample-use are mutually exclusive. |
LGTM with a tiny tweak below.
Would be good to add a test that this flag is being honored, either in this patch or in a follow-up.
lib/CodeGen/BackendUtil.cpp | ||
---|---|---|
873–874 | No need for this? The optional should be disengaged by default when constructed as you do above. |
(Also, sorry for the delay reviewing this, for some reason I thought this already got reviewed and landed...)
Thanks for the review!
I'll add the test in a follow-up patch. Could you help suggest how to add a test for this? Shall I just invoke "clang -cc1 -fexperimental-new-pass-manager" and check if discriminator is generated? That seems an integration test.
Maybe make this an optional to avoid the big predicate below?