diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2024-09-18 07:05:03 +1000 | 
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2024-09-19 20:10:42 +1000 | 
| commit | fda530d7292ee98197b56faeaa670bcafc8754c4 (patch) | |
| tree | b95537f8e2ede6be231b6d5faeb9490396d89329 /compiler/rustc_codegen_llvm/src/common.rs | |
| parent | eb575506f2adc26702fb33bb5c3879afeca5a9d8 (diff) | |
| download | rust-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
