-
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
Clean up various LLVM FFI things in codegen_llvm #137549
Conversation
…nly imported trait
r? @SparrowLii rustbot has assigned @SparrowLii. Use |
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.
This looks nice, but I'm not familiar with llvm, especially when it comes to the lifetimes around GenericCx
XD. I guess this is the main part of this PR that should be reviewed
so r? compiler
@@ -1204,7 +1204,7 @@ unsafe extern "C" { | |||
pub(crate) fn LLVMGetCurrentDebugLocation2<'a>(Builder: &Builder<'a>) -> Option<&'a Metadata>; | |||
|
|||
// Terminators | |||
pub(crate) fn LLVMBuildRetVoid<'a>(B: &Builder<'a>) -> &'a Value; | |||
pub(crate) safe fn LLVMBuildRetVoid<'a>(B: &Builder<'a>) -> &'a Value; |
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.
Is it better to add a comment on why it's a safe API?
@bors r+ |
Clean up various LLVM FFI things in codegen_llvm cc `@ZuseZ4` I touched some autodiff parts The major change of this PR is [bfd88ce](rust-lang@bfd88ce) which makes `CodegenCx` generic just like `GenericBuilder` The other commits mostly took advantage of the new feature of making extern functions safe, but also just used some wrappers that were already there and shrunk unsafe blocks. best reviewed commit-by-commit
Clean up various LLVM FFI things in codegen_llvm cc ``@ZuseZ4`` I touched some autodiff parts The major change of this PR is [bfd88ce](rust-lang@bfd88ce) which makes `CodegenCx` generic just like `GenericBuilder` The other commits mostly took advantage of the new feature of making extern functions safe, but also just used some wrappers that were already there and shrunk unsafe blocks. best reviewed commit-by-commit
Clean up various LLVM FFI things in codegen_llvm cc ````@ZuseZ4```` I touched some autodiff parts The major change of this PR is [bfd88ce](rust-lang@bfd88ce) which makes `CodegenCx` generic just like `GenericBuilder` The other commits mostly took advantage of the new feature of making extern functions safe, but also just used some wrappers that were already there and shrunk unsafe blocks. best reviewed commit-by-commit
…mpiler-errors Rollup of 10 pull requests Successful merges: - rust-lang#135651 (Support for `wasm32-wali-linux-musl` Tier-3 target) - rust-lang#136642 (Put the alloc unit tests in a separate alloctests package) - rust-lang#137337 (Add verbatim linker to AIXLinker) - rust-lang#137549 (Clean up various LLVM FFI things in codegen_llvm) - rust-lang#137957 (Remove i586-pc-windows-msvc) - rust-lang#138063 (Improve `-Zunpretty=hir` for parsed attrs) - rust-lang#138137 (setTargetTriple now accepts Triple rather than string) - rust-lang#138141 (tests: fix some typos in comment) - rust-lang#138150 (Streamline HIR intravisit `visit_id` calls for items) - rust-lang#138173 (Delay bug for negative auto trait rather than ICEing) r? `@ghost` `@rustbot` modify labels: rollup
…iaskrgr Rollup of 6 pull requests Successful merges: - rust-lang#134797 (Ergonomic ref counting) - rust-lang#137549 (Clean up various LLVM FFI things in codegen_llvm) - rust-lang#137977 (Reduce `kw::Empty` usage, part 1) - rust-lang#138042 (Suggest struct or union to add generic that impls trait) - rust-lang#138141 (tests: fix some typos in comment) - rust-lang#138150 (Streamline HIR intravisit `visit_id` calls for items) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#137549 - oli-obk:llvm-ffi, r=davidtwco Clean up various LLVM FFI things in codegen_llvm cc ```@ZuseZ4``` I touched some autodiff parts The major change of this PR is [bfd88ce](rust-lang@bfd88ce) which makes `CodegenCx` generic just like `GenericBuilder` The other commits mostly took advantage of the new feature of making extern functions safe, but also just used some wrappers that were already there and shrunk unsafe blocks. best reviewed commit-by-commit
cc @ZuseZ4 I touched some autodiff parts
The major change of this PR is bfd88ce which makes
CodegenCx
generic just likeGenericBuilder
The other commits mostly took advantage of the new feature of making extern functions safe, but also just used some wrappers that were already there and shrunk unsafe blocks.
best reviewed commit-by-commit