Skip to content

Commit c7d39e0

Browse files
committed
Remove unused method
1 parent 7cab813 commit c7d39e0

File tree

1 file changed

+1
-18
lines changed

1 file changed

+1
-18
lines changed

src/librustc_codegen_llvm/builder.rs

+1-18
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
use llvm;
1414
use llvm::{AtomicRmwBinOp, AtomicOrdering, SynchronizationScope, AsmDialect};
1515
use llvm::{Opcode, IntPredicate, RealPredicate, False, OperandBundleDef};
16-
use llvm::{ValueRef, BasicBlockRef, BuilderRef, ModuleRef};
16+
use llvm::{ValueRef, BasicBlockRef, BuilderRef};
1717
use common::*;
1818
use type_::Type;
1919
use value::Value;
@@ -1157,23 +1157,6 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
11571157
}
11581158
}
11591159

1160-
pub fn trap(&self) {
1161-
unsafe {
1162-
let bb: BasicBlockRef = llvm::LLVMGetInsertBlock(self.llbuilder);
1163-
let fn_: ValueRef = llvm::LLVMGetBasicBlockParent(bb);
1164-
let m: ModuleRef = llvm::LLVMGetGlobalParent(fn_);
1165-
let p = "llvm.trap\0".as_ptr();
1166-
let t: ValueRef = llvm::LLVMGetNamedFunction(m, p as *const _);
1167-
assert!((t as isize != 0));
1168-
let args: &[ValueRef] = &[];
1169-
self.count_insn("trap");
1170-
llvm::LLVMRustBuildCall(self.llbuilder, t,
1171-
args.as_ptr(), args.len() as c_uint,
1172-
ptr::null_mut(),
1173-
noname());
1174-
}
1175-
}
1176-
11771160
pub fn landing_pad(&self, ty: Type, pers_fn: ValueRef,
11781161
num_clauses: usize) -> ValueRef {
11791162
self.count_insn("landingpad");

0 commit comments

Comments
 (0)