about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src/common.rs
diff options
context:
space:
mode:
authorNicholas Nethercote <n.nethercote@gmail.com>2024-09-18 07:05:03 +1000
committerNicholas Nethercote <n.nethercote@gmail.com>2024-09-19 20:10:42 +1000
commitfda530d7292ee98197b56faeaa670bcafc8754c4 (patch)
treeb95537f8e2ede6be231b6d5faeb9490396d89329 /compiler/rustc_codegen_llvm/src/common.rs
parenteb575506f2adc26702fb33bb5c3879afeca5a9d8 (diff)
downloadrust-fda530d7292ee98197b56faeaa670bcafc8754c4.tar.gz
rust-fda530d7292ee98197b56faeaa670bcafc8754c4.zip
Streamline `hidden` visibility setting.
In `get_fn` there is a complicated set of if/elses to determine if
`hidden` visibility should be applied. There are five calls to
`LLVMRustSetVisibility` and some repetition in the comments.

This commit streamlines it a bit:
- Computes `hidden` and then uses it to determine if a single call to
  `LLVMRustSetVisibility` occurs.
- Converts some of the if/elses into boolean expressions.
- Removes the repetitive comments.

Overall this makes it quite a bit shorter, and I find it easier to read.
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/common.rs')
0 files changed, 0 insertions, 0 deletions