Format code
This commit is contained in:
parent
f848dbbda5
commit
580e5ba456
3 changed files with 9 additions and 11 deletions
|
|
@ -25,7 +25,7 @@ use rustc_middle::ty::layout::{
|
|||
FnAbiError, FnAbiOfHelpers, FnAbiRequest, HasParamEnv, HasTyCtxt, LayoutError, LayoutOfHelpers,
|
||||
TyAndLayout,
|
||||
};
|
||||
use rustc_middle::ty::{ParamEnv, Ty, TyCtxt, Instance};
|
||||
use rustc_middle::ty::{Instance, ParamEnv, Ty, TyCtxt};
|
||||
use rustc_span::def_id::DefId;
|
||||
use rustc_span::Span;
|
||||
use rustc_target::abi::{
|
||||
|
|
@ -904,11 +904,7 @@ impl<'a, 'gcc, 'tcx> BuilderMethods<'a, 'tcx> for Builder<'a, 'gcc, 'tcx> {
|
|||
// TODO(antoyo): It might be better to return a LValue, but fixing the rustc API is non-trivial.
|
||||
self.stack_var_count.set(self.stack_var_count.get() + 1);
|
||||
self.current_func()
|
||||
.new_local(
|
||||
self.location,
|
||||
ty,
|
||||
&format!("stack_var_{}", self.stack_var_count.get()),
|
||||
)
|
||||
.new_local(self.location, ty, &format!("stack_var_{}", self.stack_var_count.get()))
|
||||
.get_address(self.location)
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -110,7 +110,7 @@ pub struct CodegenCx<'gcc, 'tcx> {
|
|||
local_gen_sym_counter: Cell<usize>,
|
||||
|
||||
eh_personality: Cell<Option<RValue<'gcc>>>,
|
||||
#[cfg(feature="master")]
|
||||
#[cfg(feature = "master")]
|
||||
pub rust_try_fn: Cell<Option<(Type<'gcc>, Function<'gcc>)>>,
|
||||
|
||||
pub pointee_infos: RefCell<FxHashMap<(Ty<'tcx>, Size), Option<PointeeInfo>>>,
|
||||
|
|
@ -122,7 +122,7 @@ pub struct CodegenCx<'gcc, 'tcx> {
|
|||
/// FIXME(antoyo): fix the rustc API to avoid having this hack.
|
||||
pub structs_as_pointer: RefCell<FxHashSet<RValue<'gcc>>>,
|
||||
|
||||
#[cfg(feature="master")]
|
||||
#[cfg(feature = "master")]
|
||||
pub cleanup_blocks: RefCell<FxHashSet<Block<'gcc>>>,
|
||||
}
|
||||
|
||||
|
|
@ -324,11 +324,11 @@ impl<'gcc, 'tcx> CodegenCx<'gcc, 'tcx> {
|
|||
struct_types: Default::default(),
|
||||
local_gen_sym_counter: Cell::new(0),
|
||||
eh_personality: Cell::new(None),
|
||||
#[cfg(feature="master")]
|
||||
#[cfg(feature = "master")]
|
||||
rust_try_fn: Cell::new(None),
|
||||
pointee_infos: Default::default(),
|
||||
structs_as_pointer: Default::default(),
|
||||
#[cfg(feature="master")]
|
||||
#[cfg(feature = "master")]
|
||||
cleanup_blocks: Default::default(),
|
||||
};
|
||||
// TODO(antoyo): instead of doing this, add SsizeT to libgccjit.
|
||||
|
|
|
|||
|
|
@ -816,7 +816,9 @@ pub fn generic_simd_intrinsic<'a, 'gcc, 'tcx>(
|
|||
let (_, element_ty0) = arg_tys[0].simd_size_and_type(bx.tcx());
|
||||
let (_, element_ty1) = arg_tys[1].simd_size_and_type(bx.tcx());
|
||||
let (pointer_count, underlying_ty) = match *element_ty1.kind() {
|
||||
ty::RawPtr(p_ty, _) if p_ty == in_elem => (ptr_count(element_ty1), non_ptr(element_ty1)),
|
||||
ty::RawPtr(p_ty, _) if p_ty == in_elem => {
|
||||
(ptr_count(element_ty1), non_ptr(element_ty1))
|
||||
}
|
||||
_ => {
|
||||
require!(
|
||||
false,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue