about summary refs log tree commit diff
diff options
context:
space:
mode:
authorOliver Schneider <github35764891676564198441@oli-obk.de>2018-07-20 18:42:45 +0200
committerOliver Schneider <github35764891676564198441@oli-obk.de>2018-07-20 18:43:25 +0200
commitc7d39e0c510206b74453ca8636e647852e6f294c (patch)
tree03e820cb03c253d2e8ae4f2c076692ac1c588628
parent7cab813ad91ec7b2016ae3c0e6fc804becb2d623 (diff)
downloadrust-c7d39e0c510206b74453ca8636e647852e6f294c.tar.gz
rust-c7d39e0c510206b74453ca8636e647852e6f294c.zip
Remove unused method
-rw-r--r--src/librustc_codegen_llvm/builder.rs19
1 files changed, 1 insertions, 18 deletions
diff --git a/src/librustc_codegen_llvm/builder.rs b/src/librustc_codegen_llvm/builder.rs
index c71e49b0d88..e4acb2ad4b1 100644
--- a/src/librustc_codegen_llvm/builder.rs
+++ b/src/librustc_codegen_llvm/builder.rs
@@ -13,7 +13,7 @@
 use llvm;
 use llvm::{AtomicRmwBinOp, AtomicOrdering, SynchronizationScope, AsmDialect};
 use llvm::{Opcode, IntPredicate, RealPredicate, False, OperandBundleDef};
-use llvm::{ValueRef, BasicBlockRef, BuilderRef, ModuleRef};
+use llvm::{ValueRef, BasicBlockRef, BuilderRef};
 use common::*;
 use type_::Type;
 use value::Value;
@@ -1157,23 +1157,6 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
         }
     }
 
-    pub fn trap(&self) {
-        unsafe {
-            let bb: BasicBlockRef = llvm::LLVMGetInsertBlock(self.llbuilder);
-            let fn_: ValueRef = llvm::LLVMGetBasicBlockParent(bb);
-            let m: ModuleRef = llvm::LLVMGetGlobalParent(fn_);
-            let p = "llvm.trap\0".as_ptr();
-            let t: ValueRef = llvm::LLVMGetNamedFunction(m, p as *const _);
-            assert!((t as isize != 0));
-            let args: &[ValueRef] = &[];
-            self.count_insn("trap");
-            llvm::LLVMRustBuildCall(self.llbuilder, t,
-                                    args.as_ptr(), args.len() as c_uint,
-                                    ptr::null_mut(),
-                                    noname());
-        }
-    }
-
     pub fn landing_pad(&self, ty: Type, pers_fn: ValueRef,
                        num_clauses: usize) -> ValueRef {
         self.count_insn("landingpad");