diff options
author | 2017-02-14 15:50:04 +0000 | |
---|---|---|
committer | 2017-02-14 15:52:37 +0000 | |
commit | a751f92b9fc21930547ea67347604fca0d0ed1e6 (patch) | |
tree | b78c4a4d1f359391f5c17092dcd64ed4d9efb016 /src/tools/benchmark | |
parent | 83c0a60b5c4b8ecc266e7a736ec154b9d256e2c1 (diff) |
Refactoring: Types report what class of labels they contain.
Currently label-type attributes are detected in many places across the
codebase by simply reference-comparing against each of the label types.
This CL aims to generalize most of these cases, moving the encoding of
this logic into a single place (Type/BuildType itself). Not all of these
cases can be made general without further refactoring, and some perhaps
shouldn't be - serialization and Skylark rule context, for example, need
to do exotic things based on the type. But most sites can avoid having to
enumerate all the types they work with explicitly.
This causes LABEL_DICT_UNARY to start being treated like the other label
types, which means that CcToolchainSuiteRule and JavaRuntimeSuiteRule
need to include a set of allowed file types (none, in their case).
Skylark will continue treating it as a dictionary from String to Label
in its rule context, however, to avoid visible behavior changes.
--
PiperOrigin-RevId: 147471542
MOS_MIGRATED_REVID=147471542
Diffstat (limited to 'src/tools/benchmark')
0 files changed, 0 insertions, 0 deletions