-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
cg_llvm: Reduce visibility of all functions in the llvm module #136881
Conversation
This looks good, but let's just double-check the enzyme part. @ZuseZ4 There are a few bindings in |
Thanks for the heads-up. I think I'm only using them in rustc_cg_llvm anyway so pub(crate) makes sense. Overall I find that the |
Sounds good. Easy enough to change later if you prefer a different approach. @bors r+ |
☔ The latest upstream changes (presumably #136905) made this pull request unmergeable. Please resolve the merge conflicts. |
c96d47f
to
f8786df
Compare
@rustbot ready |
This was unused after the removal of `-Zprofile` in rust-lang#131829.
|
||
// Create modules. | ||
pub fn LLVMModuleCreateWithNameInContext(ModuleID: *const c_char, C: &Context) -> &Module; | ||
pub fn LLVMGetModuleContext(M: &Module) -> &Context; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I noticed that LLVMGetModuleContext
is being completely removed here, since it became unused in #131829.
That's fine, but I'm going to split it out into a separate patch (in this PR) so that it's easier to see in history and doesn't get hidden in the mass migration to pub(crate)
.
@bors r+ If this keeps running into conflicts we might have to look into splitting it up, but for now let's just try again. |
cg_llvm: Reduce visibility of all functions in the llvm module Next part of rust-lang#135502 This reduces the visibility of all functions in the `llvm` module to `pub(crate)` and marks the `enzyme_ffi` modules with `#![expect(dead_code)]` (as previously discussed: <rust-lang#135502 (comment)>). r? `@Zalathar`
Rollup of 9 pull requests Successful merges: - rust-lang#134999 (Add cygwin target.) - rust-lang#136324 (Implement `f{16,32,64,128}::{erf,erfc}` (`#![feature(float_erf)]`)) - rust-lang#136559 (Resolve named regions when reporting type test failures in NLL) - rust-lang#136660 (Use a trait to enforce field validity for union fields + `unsafe` fields + `unsafe<>` binder types) - rust-lang#136858 (Parallel-compiler-related cleanup) - rust-lang#136881 (cg_llvm: Reduce visibility of all functions in the llvm module) - rust-lang#136888 (Always perform discr read for never pattern in EUV) - rust-lang#136948 (Split out the `extern_system_varargs` feature) - rust-lang#136949 (Fix import in bench for wasm) r? `@ghost` `@rustbot` modify labels: rollup
Rollup of 8 pull requests Successful merges: - rust-lang#134999 (Add cygwin target.) - rust-lang#136559 (Resolve named regions when reporting type test failures in NLL) - rust-lang#136660 (Use a trait to enforce field validity for union fields + `unsafe` fields + `unsafe<>` binder types) - rust-lang#136858 (Parallel-compiler-related cleanup) - rust-lang#136881 (cg_llvm: Reduce visibility of all functions in the llvm module) - rust-lang#136888 (Always perform discr read for never pattern in EUV) - rust-lang#136948 (Split out the `extern_system_varargs` feature) - rust-lang#136949 (Fix import in bench for wasm) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#136881 - dpaoliello:cleanllvm3, r=Zalathar cg_llvm: Reduce visibility of all functions in the llvm module Next part of rust-lang#135502 This reduces the visibility of all functions in the `llvm` module to `pub(crate)` and marks the `enzyme_ffi` modules with `#![expect(dead_code)]` (as previously discussed: <rust-lang#135502 (comment)>). r? ``@Zalathar``
Next part of #135502
This reduces the visibility of all functions in the
llvm
module topub(crate)
and marks theenzyme_ffi
modules with#![expect(dead_code)]
(as previously discussed: #135502 (comment)).r? @Zalathar