Skip to content

Commit edd6ed5

Browse files
committed
Fix some errors
1 parent 95ed511 commit edd6ed5

File tree

7 files changed

+17
-131
lines changed

7 files changed

+17
-131
lines changed

src/librustc_codegen_llvm/glue.rs

Lines changed: 0 additions & 122 deletions
This file was deleted.

src/librustc_codegen_llvm/intrinsic.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ use mir::operand::{OperandRef, OperandValue};
1919
use base::*;
2020
use common::*;
2121
use declare;
22-
use glue;
2322
use type_::Type;
2423
use type_of::LayoutLlvmExt;
2524
use rustc::ty::{self, Ty};
@@ -146,7 +145,7 @@ pub fn codegen_intrinsic_call<'a, 'tcx>(bx: &Builder<'a, 'tcx>,
146145
let tp_ty = substs.type_at(0);
147146
if let OperandValue::Pair(_, meta) = args[0].val {
148147
let (llsize, _) =
149-
glue::size_and_align_of_dst(bx, tp_ty, meta);
148+
size_and_align_of_dst(bx, tp_ty, meta);
150149
llsize
151150
} else {
152151
C_usize(cx, cx.size_of(tp_ty).bytes())
@@ -160,7 +159,7 @@ pub fn codegen_intrinsic_call<'a, 'tcx>(bx: &Builder<'a, 'tcx>,
160159
let tp_ty = substs.type_at(0);
161160
if let OperandValue::Pair(_, meta) = args[0].val {
162161
let (_, llalign) =
163-
glue::size_and_align_of_dst(bx, tp_ty, meta);
162+
size_and_align_of_dst(bx, tp_ty, meta);
164163
llalign
165164
} else {
166165
C_usize(cx, cx.align_of(tp_ty).abi())

src/librustc_codegen_llvm/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,6 @@ mod consts;
109109
mod context;
110110
mod debuginfo;
111111
mod declare;
112-
mod glue;
113112
mod intrinsic;
114113
mod llvm_util;
115114
mod metadata;

src/librustc_codegen_llvm/mir/place.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,13 @@ use rustc::mir::tcx::PlaceTy;
1616
use rustc_data_structures::indexed_vec::Idx;
1717
use base;
1818
use builder::Builder;
19-
use common::{CodegenCx, C_undef, C_usize, C_u8, C_u32, C_uint, C_null, C_uint_big};
19+
use common::{
20+
CodegenCx, C_undef, C_usize, C_u8, C_u32, C_uint, C_null, C_uint_big,size_and_align_of_dst
21+
};
2022
use consts;
2123
use type_of::LayoutLlvmExt;
2224
use type_::Type;
2325
use value::Value;
24-
use glue;
2526

2627
use std::ptr;
2728

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

224225
// Get the alignment of the field
225-
let (_, unsized_align) = glue::size_and_align_of_dst(bx, field.ty, meta);
226+
let (_, unsized_align) = size_and_align_of_dst(bx, field.ty, meta);
226227

227228
// Bump the unaligned offset up to the appropriate alignment using the
228229
// following expression:

src/librustc_codegen_llvm/mono_item.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ use std::fmt;
3333

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

36-
use rustc_mir::monomorphize::item::*;
3736
pub use rustc_mir::monomorphize::item::MonoItemExt as BaseMonoItemExt;
3837

3938
pub trait MonoItemExt<'a, 'tcx>: fmt::Debug + BaseMonoItemExt<'a, 'tcx> {

src/librustc_codegen_llvm/type_of.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ use rustc::ty::{self, Ty, TypeFoldable};
1616
use rustc::ty::layout::{self, Align, LayoutOf, Size, TyLayout};
1717
use rustc_target::spec::PanicStrategy;
1818
use rustc_target::abi::FloatTy;
19-
use mono_item::DefPathBasedNames;
19+
use rustc_mir::monomorphize::item::DefPathBasedNames;
2020
use type_::Type;
2121

2222
use std::fmt::Write;

src/librustc_codegen_utils/llvm_target_features.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
// Copyright 2017 The Rust Project Developers. See the COPYRIGHT
2+
// file at the top-level directory of this distribution and at
3+
// http://rust-lang.org/COPYRIGHT.
4+
//
5+
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6+
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7+
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8+
// option. This file may not be copied, modified, or distributed
9+
// except according to those terms.
10+
111
use rustc::session::Session;
212

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

0 commit comments

Comments
 (0)