Skip to content

Commit 2dbde55

Browse files
committed
rustc_codegen_llvm: use safe references for Builder.
1 parent d04e66d commit 2dbde55

File tree

2 files changed

+142
-144
lines changed

2 files changed

+142
-144
lines changed

src/librustc_codegen_llvm/builder.rs

Lines changed: 2 additions & 3 deletions
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};
16+
use llvm::{ValueRef, BasicBlockRef};
1717
use common::*;
1818
use type_::Type;
1919
use value::Value;
@@ -32,7 +32,7 @@ use syntax_pos::Span;
3232
// All Builders must have an llfn associated with them
3333
#[must_use]
3434
pub struct Builder<'a, 'll: 'a, 'tcx: 'll> {
35-
pub llbuilder: BuilderRef,
35+
pub llbuilder: &'ll llvm::Builder,
3636
pub cx: &'a CodegenCx<'ll, 'tcx>,
3737
}
3838

@@ -599,7 +599,6 @@ impl Builder<'a, 'll, 'tcx> {
599599
flags: MemFlags,
600600
) -> ValueRef {
601601
debug!("Store {:?} -> {:?} ({:?})", Value(val), Value(ptr), flags);
602-
assert!(!self.llbuilder.is_null());
603602
self.count_insn("store");
604603
let ptr = self.check_store(val, ptr);
605604
unsafe {

0 commit comments

Comments
 (0)