This is an archive of the discontinued LLVM Phabricator instance.

[sancov] code readability improvement.
ClosedPublic

Authored by aizatsky on Mar 23 2016, 10:37 AM.

Diff Detail

Repository
rL LLVM

Event Timeline

aizatsky updated this revision to Diff 51443.Mar 23 2016, 10:37 AM
aizatsky retitled this revision from to [sancov] code readability improvement..
aizatsky updated this object.
aizatsky added a subscriber: llvm-commits.
vitalybuka accepted this revision.Mar 23 2016, 10:54 AM
vitalybuka edited edge metadata.

LGTM anyway

lib/Transforms/Instrumentation/SanitizerCoverage.cpp
319 ↗(On Diff #51443)

Reverse logic is still better :-)

static bool isNotFullDominator(const BasicBlock *BB, const DominatorTree *DT) {

for (const BasicBlock *SUCC : make_range(succ_begin(BB), succ_end(BB))) {
  if (!DT->dominates(BB, SUCC))
    return true;
}
return false;

}

350 ↗(On Diff #51443)

return isNotFullDominator() && isNotFullPostDominator();

This revision is now accepted and ready to land.Mar 23 2016, 10:54 AM
This revision was automatically updated to reflect the committed changes.