[PATCH] D35925: [Coverage] Precise region termination with deferred regions
Alex Lorenz via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Aug 1 09:37:27 PDT 2017
arphaman accepted this revision.
arphaman added a comment.
This revision is now accepted and ready to land.
Thanks, it does make sense to update llvm-cov.
LGTM:
================
Comment at: lib/CodeGen/CoverageMappingGen.cpp:554
+ // useful to try and create a deferred region inside of one.
+ UpdateDeferredRegion &= SM.getFileID(EndLoc) == SM.getMainFileID();
+
----------------
Might be better to use `&&` to avoid extra work.
================
Comment at: lib/CodeGen/CoverageMappingGen.cpp:561
+ } else {
+ if (Region.isDeferred()) {
+ assert(!ParentOfDeferredRegion && "Consecutive deferred regions");
----------------
You can use `else if` here.
https://reviews.llvm.org/D35925
More information about the cfe-commits
mailing list