use llvm::{self, AttributePlace};
use base;
use builder::{Builder, MemFlags};
-use common::C_usize;
use context::CodegenCx;
use mir::place::PlaceRef;
use mir::operand::OperandValue;
use type_of::{LayoutLlvmExt, PointerKind};
use value::Value;
-use traits::BuilderMethods;
+use interfaces::{BuilderMethods, CommonMethods};
use rustc_target::abi::{HasDataLayout, LayoutOf, Size, TyLayout, Abi as LayoutAbi};
use rustc::ty::{self, Ty};
}
}
RegKind::Vector => {
- Type::vector::<Value>(Type::i8(cx), self.size.bytes())
+ Type::vector(Type::i8(cx), self.size.bytes())
}
}
}
// Simplify to array when all chunks are the same size and type
if rem_bytes == 0 {
- return Type::array::<Value>(rest_ll_unit, rest_count);
+ return Type::array(rest_ll_unit, rest_count);
}
}
if self.is_ignore() {
return;
}
- let cx = bx.cx;
+ let cx = bx.cx();
if self.is_sized_indirect() {
OperandValue::Ref(val, None, self.layout.align).store(bx, dst)
} else if self.is_unsized_indirect() {
self.layout.align,
bx.pointercast(llscratch, Type::i8p(cx)),
scratch_align,
- C_usize(cx, self.layout.size.bytes()),
+ cx.c_usize(self.layout.size.bytes()),
MemFlags::empty());
bx.lifetime_end(llscratch, scratch_size);
}
if self.variadic {
- Type::variadic_func::<Value>(&llargument_tys, llreturn_ty)
+ Type::variadic_func(&llargument_tys, llreturn_ty)
} else {
- Type::func::<Value>(&llargument_tys, llreturn_ty)
+ Type::func(&llargument_tys, llreturn_ty)
}
}
// by the LLVM verifier.
if let layout::Int(..) = scalar.value {
if !scalar.is_bool() {
- let range = scalar.valid_range_exclusive(bx.cx);
+ let range = scalar.valid_range_exclusive(bx.cx());
if range.start != range.end {
bx.range_metadata(callsite, range);
}