@@ -91,10 +91,8 @@ pub struct icx_popper {
91
91
#[ unsafe_destructor]
92
92
impl Drop for icx_popper {
93
93
fn finalize ( & self ) {
94
- unsafe {
95
- if self . ccx . sess . count_llvm_insns ( ) {
96
- self . ccx . stats . llvm_insn_ctxt . pop ( ) ;
97
- }
94
+ if self . ccx . sess . count_llvm_insns ( ) {
95
+ self . ccx . stats . llvm_insn_ctxt . pop ( ) ;
98
96
}
99
97
}
100
98
}
@@ -145,9 +143,7 @@ pub fn decl_fn(llmod: ModuleRef, name: &str, cc: lib::llvm::CallConv,
145
143
llvm:: LLVMGetOrInsertFunction ( llmod, buf, llty)
146
144
}
147
145
} ) ;
148
- unsafe {
149
- lib:: llvm:: SetFunctionCallConv ( llfn, cc) ;
150
- }
146
+ lib:: llvm:: SetFunctionCallConv ( llfn, cc) ;
151
147
return llfn;
152
148
}
153
149
@@ -730,11 +726,9 @@ pub fn cast_shift_expr_rhs(cx: block, op: ast::binop,
730
726
731
727
pub fn cast_shift_const_rhs ( op : ast:: binop ,
732
728
lhs : ValueRef , rhs : ValueRef ) -> ValueRef {
733
- unsafe {
734
- cast_shift_rhs ( op, lhs, rhs,
735
- |a, b| unsafe { llvm:: LLVMConstTrunc ( a, b) } ,
736
- |a, b| unsafe { llvm:: LLVMConstZExt ( a, b) } )
737
- }
729
+ cast_shift_rhs ( op, lhs, rhs,
730
+ |a, b| unsafe { llvm:: LLVMConstTrunc ( a, b) } ,
731
+ |a, b| unsafe { llvm:: LLVMConstZExt ( a, b) } )
738
732
}
739
733
740
734
pub fn cast_shift_rhs ( op : ast:: binop ,
@@ -2865,9 +2859,7 @@ pub fn create_module_map(ccx: @CrateContext) -> ValueRef {
2865
2859
llvm::LLVMAddGlobal(ccx.llmod, maptype, buf)
2866
2860
}
2867
2861
});
2868
- unsafe {
2869
- lib::llvm::SetLinkage(map, lib::llvm::InternalLinkage);
2870
- }
2862
+ lib::llvm::SetLinkage(map, lib::llvm::InternalLinkage);
2871
2863
let mut elts: ~[ValueRef] = ~[];
2872
2864
for ccx.module_data.each |key, &val| {
2873
2865
let elt = C_struct(~[p2i(ccx, C_cstr(ccx, @/*bad*/ copy *key)),
0 commit comments