Skip to content

Commit

Permalink
Fix some errors
Browse files Browse the repository at this point in the history
  • Loading branch information
bjorn3 committed Jul 7, 2018
1 parent 95ed511 commit edd6ed5
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 131 deletions.
122 changes: 0 additions & 122 deletions src/librustc_codegen_llvm/glue.rs

This file was deleted.

5 changes: 2 additions & 3 deletions src/librustc_codegen_llvm/intrinsic.rs
Expand Up @@ -19,7 +19,6 @@ use mir::operand::{OperandRef, OperandValue};
use base::*;
use common::*;
use declare;
use glue;
use type_::Type;
use type_of::LayoutLlvmExt;
use rustc::ty::{self, Ty};
Expand Down Expand Up @@ -146,7 +145,7 @@ pub fn codegen_intrinsic_call<'a, 'tcx>(bx: &Builder<'a, 'tcx>,
let tp_ty = substs.type_at(0);
if let OperandValue::Pair(_, meta) = args[0].val {
let (llsize, _) =
glue::size_and_align_of_dst(bx, tp_ty, meta);
size_and_align_of_dst(bx, tp_ty, meta);
llsize
} else {
C_usize(cx, cx.size_of(tp_ty).bytes())
Expand All @@ -160,7 +159,7 @@ pub fn codegen_intrinsic_call<'a, 'tcx>(bx: &Builder<'a, 'tcx>,
let tp_ty = substs.type_at(0);
if let OperandValue::Pair(_, meta) = args[0].val {
let (_, llalign) =
glue::size_and_align_of_dst(bx, tp_ty, meta);
size_and_align_of_dst(bx, tp_ty, meta);
llalign
} else {
C_usize(cx, cx.align_of(tp_ty).abi())
Expand Down
1 change: 0 additions & 1 deletion src/librustc_codegen_llvm/lib.rs
Expand Up @@ -109,7 +109,6 @@ mod consts;
mod context;
mod debuginfo;
mod declare;
mod glue;
mod intrinsic;
mod llvm_util;
mod metadata;
Expand Down
7 changes: 4 additions & 3 deletions src/librustc_codegen_llvm/mir/place.rs
Expand Up @@ -16,12 +16,13 @@ use rustc::mir::tcx::PlaceTy;
use rustc_data_structures::indexed_vec::Idx;
use base;
use builder::Builder;
use common::{CodegenCx, C_undef, C_usize, C_u8, C_u32, C_uint, C_null, C_uint_big};
use common::{
CodegenCx, C_undef, C_usize, C_u8, C_u32, C_uint, C_null, C_uint_big,size_and_align_of_dst
};
use consts;
use type_of::LayoutLlvmExt;
use type_::Type;
use value::Value;
use glue;

use std::ptr;

Expand Down Expand Up @@ -222,7 +223,7 @@ impl<'a, 'tcx> PlaceRef<'tcx> {
let unaligned_offset = C_usize(cx, offset.bytes());

// Get the alignment of the field
let (_, unsized_align) = glue::size_and_align_of_dst(bx, field.ty, meta);
let (_, unsized_align) = size_and_align_of_dst(bx, field.ty, meta);

// Bump the unaligned offset up to the appropriate alignment using the
// following expression:
Expand Down
1 change: 0 additions & 1 deletion src/librustc_codegen_llvm/mono_item.rs
Expand Up @@ -33,7 +33,6 @@ use std::fmt;

pub use rustc::mir::mono::MonoItem;

use rustc_mir::monomorphize::item::*;
pub use rustc_mir::monomorphize::item::MonoItemExt as BaseMonoItemExt;

pub trait MonoItemExt<'a, 'tcx>: fmt::Debug + BaseMonoItemExt<'a, 'tcx> {
Expand Down
2 changes: 1 addition & 1 deletion src/librustc_codegen_llvm/type_of.rs
Expand Up @@ -16,7 +16,7 @@ use rustc::ty::{self, Ty, TypeFoldable};
use rustc::ty::layout::{self, Align, LayoutOf, Size, TyLayout};
use rustc_target::spec::PanicStrategy;
use rustc_target::abi::FloatTy;
use mono_item::DefPathBasedNames;
use rustc_mir::monomorphize::item::DefPathBasedNames;
use type_::Type;

use std::fmt::Write;
Expand Down
10 changes: 10 additions & 0 deletions src/librustc_codegen_utils/llvm_target_features.rs
@@ -1,3 +1,13 @@
// Copyright 2017 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.

use rustc::session::Session;

// WARNING: the features after applying `to_llvm_feature` must be known
Expand Down

0 comments on commit edd6ed5

Please sign in to comment.