Generate coverage mappings for <init> in switch (<init>; <cond>).
Details
Details
Diff Detail
Diff Detail
Event Timeline
Comment Actions
I'm unsure about whether or not the CodeGenPGO change in this patch deserves more testing.
It wouldn't harm to add a test for CodeGenPGO as well. A good test that you can as a starting point for the new one is test/Profile/cxx-rangefor.cpp. A single PGOGEN check for a PGO counter generated from a subexpression in a switch initializer should be sufficient.
lib/CodeGen/CoverageMappingGen.cpp | ||
---|---|---|
818 | I noticed that you added a newline here, wouldn't it be better to have it after extendRegion(S) so that the Visit calls are grouped together? |
Comment Actions
Per @arphaman's comments:
- Add a CodeGenPGO test which checks whether counters can be created for statements inside of switch initializers.
- Group calls to 'Visit' together.
I noticed that you added a newline here, wouldn't it be better to have it after extendRegion(S) so that the Visit calls are grouped together?