This is an archive of the discontinued LLVM Phabricator instance.

Use more early returns in SymbolTable.cpp.
ClosedPublic

Authored by ruiu on Feb 20 2018, 10:41 AM.

Details

Summary

I think if statements that end with return is easier to read than
cascaded if-else-if-else-if statements because it makes clear that
execution of a function terminates there. This patch also adds more
blank lines to separate code blocks to meaningful pieces.

Event Timeline

ruiu created this revision.Feb 20 2018, 10:41 AM
ruiu updated this revision to Diff 135100.Feb 20 2018, 10:47 AM
  • reduces number of checkSymbolTypes function calls.

This is going to conflict pretty badly with https://reviews.llvm.org/D43496... which are we going to land first? :)

ruiu updated this revision to Diff 135101.Feb 20 2018, 10:48 AM
  • fix typo
ruiu added a comment.Feb 20 2018, 10:49 AM

Please go first.

ruiu updated this revision to Diff 135110.Feb 20 2018, 11:17 AM
  • rebased
sbc100 accepted this revision.Feb 20 2018, 1:00 PM

Nice!

This revision is now accepted and ready to land.Feb 20 2018, 1:00 PM
This revision was automatically updated to reflect the committed changes.