about summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper/Linker.cpp
diff options
context:
space:
mode:
authorNicholas Nethercote <n.nethercote@gmail.com>2022-07-05 11:23:55 +1000
committerNicholas Nethercote <n.nethercote@gmail.com>2022-07-09 09:02:50 +1000
commit16a286b003477fe07c06c5030f0ae8298c3e78ec (patch)
tree36e3af5e983c3bdefac099a51bb84e730acdef8d /compiler/rustc_llvm/llvm-wrapper/Linker.cpp
parent559398fa7860fff2b4058c302efb6f14312b0fe4 (diff)
downloadrust-16a286b003477fe07c06c5030f0ae8298c3e78ec.tar.gz
rust-16a286b003477fe07c06c5030f0ae8298c3e78ec.zip
Simplify `cs_fold`.
`cs_fold` has four distinct cases, covered by three different function
arguments:

- first field
- combine current field with previous results
- no fields
- non-matching enum variants

This commit clarifies things by replacing the three function arguments
with one that takes a new `CsFold` type with four slightly different)
cases

- single field
- combine result for current field with results for previous fields
- no fields
- non-matching enum variants

This makes the code shorter and clearer.
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/Linker.cpp')
0 files changed, 0 insertions, 0 deletions