We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 265f2fa commit 54c98abCopy full SHA for 54c98ab
src/librustc_codegen_llvm/builder.rs
@@ -27,14 +27,14 @@ use std::ptr;
27
// All Builders must have an llfn associated with them
28
#[must_use]
29
pub struct Builder<'a, 'll: 'a, 'tcx: 'll> {
30
- pub llbuilder: &'ll llvm::Builder,
+ pub llbuilder: &'ll mut llvm::Builder<'ll>,
31
pub cx: &'a CodegenCx<'ll, 'tcx>,
32
}
33
34
impl Drop for Builder<'a, 'll, 'tcx> {
35
fn drop(&mut self) {
36
unsafe {
37
- llvm::LLVMDisposeBuilder(self.llbuilder);
+ llvm::LLVMDisposeBuilder(&mut *(self.llbuilder as *mut _));
38
39
40
0 commit comments