HomePhabricator

Use locals instead of struct fields; NFC

Description

Use locals instead of struct fields; NFC

This is one of a series of changes intended to make
https://reviews.llvm.org/D44748 more easily reviewable. Please see that
patch for more context.

Since I was requested to do all of this with post-commit review, this is
about as small as I can make it (beyond committing changes to these few
files separately, but they're incredibly similar in spirit, so...)

On its own, this change doesn't make a great deal of sense. I plan on
having a follow-up Real Soon Now(TM) to make the bits here make more
sense. :)

In particular, the next change in this series is meant to make
LocationSize an actual type, which you have to call .getValue() on in
order to get at the uint64_t inside. Hence, this change refactors code
so that:

  • we only need to call the soon-to-come getValue() once in most cases, and
  • said call to getValue() happens very closely to a piece of code that checks if the LocationSize has a value (e.g. if it's != UnknownSize).

Details

Committed
gbivOct 8 2018, 7:14 PM
Parents
rL344011: llvm-link: Improve diagnostic for module-level metadata mismatch
Branches
Unknown
Tags
Unknown