-
Notifications
You must be signed in to change notification settings - Fork 12.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rustc_codegen_llvm
cleanups
#130506
Merged
bors
merged 14 commits into
rust-lang:master
from
nnethercote:rustc_codegen_llvm-cleanups
Sep 20, 2024
Merged
rustc_codegen_llvm
cleanups
#130506
bors
merged 14 commits into
rust-lang:master
from
nnethercote:rustc_codegen_llvm-cleanups
Sep 20, 2024
Commits on Sep 19, 2024
-
These can be made more concise, mostly through appropriate use of `use` declarations.
Configuration menu - View commit details
-
Copy full SHA for 785a26a - Browse repository at this point
Copy the full SHA 785a26aView commit details -
This seems to be a typo. `singletree` doesn't make sense, and everywhere else it is `singlethread`.
Configuration menu - View commit details
-
Copy full SHA for 63210bd - Browse repository at this point
Copy the full SHA 63210bdView commit details -
Configuration menu - View commit details
-
Copy full SHA for 9429e64 - Browse repository at this point
Copy the full SHA 9429e64View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0d78f1e - Browse repository at this point
Copy the full SHA 0d78f1eView commit details -
Use a macro to factor out some repetitive code.
Similar to the existing macro just above.
Configuration menu - View commit details
-
Copy full SHA for 4ce010e - Browse repository at this point
Copy the full SHA 4ce010eView commit details -
We rarely use parameter comments, and these ones don't tell us anything interesting.
Configuration menu - View commit details
-
Copy full SHA for eb57550 - Browse repository at this point
Copy the full SHA eb57550View commit details -
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.
Configuration menu - View commit details
-
Copy full SHA for fda530d - Browse repository at this point
Copy the full SHA fda530dView commit details -
It's crazy to have the integer methods in something close to random order. The reordering makes the gaps clear: `const_i64`, `const_i128`, `const_isize`, and `const_u16`. I guess they just aren't needed.
Configuration menu - View commit details
-
Copy full SHA for bfef261 - Browse repository at this point
Copy the full SHA bfef261View commit details -
Configuration menu - View commit details
-
Copy full SHA for badd8cc - Browse repository at this point
Copy the full SHA badd8ccView commit details -
I'm pretty sure `CodegenCx` applies to codegen units, rather than compilation units.
Configuration menu - View commit details
-
Copy full SHA for ccd6c61 - Browse repository at this point
Copy the full SHA ccd6c61View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3b07169 - Browse repository at this point
Copy the full SHA 3b07169View commit details -
Avoid heavy repetition in
llvm/ffi.rs
.Through judicious use of `use` and `Self`.
Configuration menu - View commit details
-
Copy full SHA for c5af8b2 - Browse repository at this point
Copy the full SHA c5af8b2View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5fd16df - Browse repository at this point
Copy the full SHA 5fd16dfView commit details -
Configuration menu - View commit details
-
Copy full SHA for 1f35940 - Browse repository at this point
Copy the full SHA 1f35940View commit details
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.