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 1
1
use libc:: { c_char, c_uint} ;
2
2
use ffi:: prelude:: { LLVMBuilderRef , LLVMValueRef } ;
3
3
use ffi:: { core, LLVMBuilder , LLVMRealPredicate , LLVMIntPredicate } ;
4
- use cbox:: { CSemiBox , DisposeRef } ;
4
+ use cbox:: CSemiBox ;
5
5
use std:: marker:: PhantomData ;
6
6
use std:: mem;
7
7
use block:: BasicBlock ;
@@ -14,6 +14,7 @@ static NULL_NAME:[c_char; 1] = [0];
14
14
/// This provides a uniform API for creating instructions and inserting them into a basic block.
15
15
pub struct Builder ( PhantomData < [ u8 ] > ) ;
16
16
native_ref ! ( & Builder = LLVMBuilderRef ) ;
17
+ dispose ! { Builder , LLVMBuilder , core:: LLVMDisposeBuilder }
17
18
macro_rules! bin_op(
18
19
( $name: ident, $func: ident) => (
19
20
pub fn $name( & self , left: & Value , right: & Value ) -> & Value {
@@ -187,12 +188,4 @@ impl Builder {
187
188
panic ! ( "expected numzextbers, got {:?}" , at)
188
189
}
189
190
}
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