File tree Expand file tree Collapse file tree 1 file changed +3
-10
lines changed Expand file tree Collapse file tree 1 file changed +3
-10
lines changed Original file line number Diff line number Diff line change 11use libc:: { c_char, c_uint} ;
22use ffi:: prelude:: { LLVMBuilderRef , LLVMValueRef } ;
33use ffi:: { core, LLVMBuilder , LLVMRealPredicate , LLVMIntPredicate } ;
4- use cbox:: { CSemiBox , DisposeRef } ;
4+ use cbox:: CSemiBox ;
55use std:: marker:: PhantomData ;
66use std:: mem;
77use block:: BasicBlock ;
@@ -14,6 +14,7 @@ static NULL_NAME:[c_char; 1] = [0];
1414/// This provides a uniform API for creating instructions and inserting them into a basic block.
1515pub struct Builder ( PhantomData < [ u8 ] > ) ;
1616native_ref ! ( & Builder = LLVMBuilderRef ) ;
17+ dispose ! { Builder , LLVMBuilder , core:: LLVMDisposeBuilder }
1718macro_rules! bin_op(
1819 ( $name: ident, $func: ident) => (
1920 pub fn $name( & self , left: & Value , right: & Value ) -> & Value {
@@ -187,12 +188,4 @@ impl Builder {
187188 panic ! ( "expected numzextbers, got {:?}" , at)
188189 }
189190 }
190- }
191-
192- impl DisposeRef for Builder {
193- type RefTo = LLVMBuilder ;
194- #[ inline( always) ]
195- unsafe fn dispose ( ptr : LLVMBuilderRef ) {
196- core:: LLVMDisposeBuilder ( ptr)
197- }
198- }
191+ }
You can’t perform that action at this time.
0 commit comments