-
Notifications
You must be signed in to change notification settings - Fork 13.8k
cg_llvm: Replace some DIBuilder wrappers with LLVM-C API bindings (part 3) #146631
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
Conversation
r? @nnethercote rustbot has assigned @nnethercote. Use |
|
||
pub(crate) fn LLVMDIBuilderCreateSubroutineType<'ll>( | ||
Builder: &DIBuilder<'ll>, | ||
File: Option<&'ll Metadata>, // (unused) |
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.
What does (unused)
mean?
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.
The underlying LLVM-C function ignores the File
argument, discarding it with no effect.
I've rephrased this comment to // (ignored and has no effect)
.
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.
(When the C API function was originally added, it needed a file argument, but subsequent changes to the underlying C++ code mean that it no longer does anything.)
} | ||
} | ||
|
||
fn create_pointer_type<'ll>( |
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.
nice encapsulation
This stuff is unfamiliar to me but it all looks pretty straightforward. I will delegate approval just in case there's a change to made in response to my question about "(unused)". @bors delegate=Zalathar |
✌️ @Zalathar, you can now approve this pull request! If @nnethercote told you to " |
145561c
to
7ab4175
Compare
I've added some clarification to the “ignored” file parameter. @nnethercote Did you intend to |
unsafe { | ||
llvm::LLVMDIBuilderCreateSubroutineType( | ||
DIB(cx), | ||
None, // (unused) |
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.
Can you change this one to (ignored and has no effect)
to match? r=me with that, thanks.
7ab4175
to
af88d14
Compare
@bors r=nnethercote rollup |
cg_llvm: Replace some DIBuilder wrappers with LLVM-C API bindings (part 3) - Part of rust-lang#134001 - Follow-up to rust-lang#136375 - Follow-up to rust-lang#136632 --- This is another batch of LLVMDIBuilder binding migrations, replacing some our own LLVMRust bindings with bindings to upstream LLVM-C APIs. This PR migrates all of the bindings that were touched by rust-lang#136632, plus `LLVMDIBuilderCreateStructType`.
Rollup of 14 pull requests Successful merges: - #142807 (libtest: expose --fail-fast as an unstable command-line option) - #144871 (Stabilize `btree_entry_insert` feature) - #145071 (Update the minimum external LLVM to 20) - #145181 (remove FIXME block from `has_significant_drop`, it never encounters inference variables) - #145660 (initial implementation of the darwin_objc unstable feature) - #145838 (don't apply temporary lifetime extension rules to non-extended `super let`) - #146259 (Suggest removing Box::new instead of unboxing it) - #146410 (Iterator repeat: no infinite loop for `last` and `count`) - #146460 (Add tidy readme) - #146552 (StateTransform: Do not renumber resume local.) - #146564 (Remove Rvalue::Len again.) - #146581 (Detect attempt to use var-args in closure) - #146588 (tests/run-make: Update list of statically linked musl targets) - #146631 (cg_llvm: Replace some DIBuilder wrappers with LLVM-C API bindings (part 3)) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of #146631 - Zalathar:di-builder, r=nnethercote cg_llvm: Replace some DIBuilder wrappers with LLVM-C API bindings (part 3) - Part of #134001 - Follow-up to #136375 - Follow-up to #136632 --- This is another batch of LLVMDIBuilder binding migrations, replacing some our own LLVMRust bindings with bindings to upstream LLVM-C APIs. This PR migrates all of the bindings that were touched by #136632, plus `LLVMDIBuilderCreateStructType`.
cg_llvm: Replace some DIBuilder wrappers with LLVM-C API bindings (part 4) - Part of rust-lang#134001 - Follow-up to rust-lang#146631 --- This is another batch of LLVMDIBuilder binding migrations, replacing some our own LLVMRust bindings with bindings to upstream LLVM-C APIs.
Rollup merge of #146673 - Zalathar:di-builder, r=nnethercote cg_llvm: Replace some DIBuilder wrappers with LLVM-C API bindings (part 4) - Part of #134001 - Follow-up to #146631 --- This is another batch of LLVMDIBuilder binding migrations, replacing some our own LLVMRust bindings with bindings to upstream LLVM-C APIs.
cg_llvm
debuginfo handling to use the LLVM-C API #134001This is another batch of LLVMDIBuilder binding migrations, replacing some our own LLVMRust bindings with bindings to upstream LLVM-C APIs.
This PR migrates all of the bindings that were touched by #136632, plus
LLVMDIBuilderCreateStructType
.