Rebase fallout
This commit is contained in:
parent
ea04cdfbe8
commit
000db3841e
@ -39,7 +39,7 @@ use middle::astencode;
|
||||
use middle::cfg;
|
||||
use middle::lang_items::{LangItem, ExchangeMallocFnLangItem, StartFnLangItem};
|
||||
use middle::weak_lang_items;
|
||||
use middle::subst::{Subst, Substs};
|
||||
use middle::subst::Substs;
|
||||
use middle::ty::{self, Ty, ClosureTyper, type_is_simd, simd_size};
|
||||
use session::config::{self, NoDebugInfo};
|
||||
use session::Session;
|
||||
|
@ -386,7 +386,10 @@ fn trans_fn_once_adapter_shim<'a, 'tcx>(
|
||||
|
||||
// Create the by-value helper.
|
||||
let function_name = link::mangle_internal_name_by_type_and_seq(ccx, llonce_fn_ty, "once_shim");
|
||||
let lloncefn = decl_internal_rust_fn(ccx, llonce_fn_ty, &function_name);
|
||||
let lloncefn = declare::define_internal_rust_fn(ccx, &function_name[..], llonce_fn_ty)
|
||||
.unwrap_or_else(||{
|
||||
ccx.sess().bug(&format!("symbol `{}` already defined", function_name));
|
||||
});
|
||||
|
||||
let sig = ty::erase_late_bound_regions(tcx, &llonce_bare_fn_ty.sig);
|
||||
let (block_arena, fcx): (TypedArena<_>, FunctionContext);
|
||||
|
@ -85,7 +85,7 @@ pub fn const_lit(cx: &CrateContext, e: &ast::Expr, lit: &ast::Lit)
|
||||
ast::LitBool(b) => C_bool(cx, b),
|
||||
ast::LitStr(ref s, _) => C_str_slice(cx, (*s).clone()),
|
||||
ast::LitBinary(ref data) => {
|
||||
addr_of(cx, C_bytes(cx, &data[..]), "binary", e.id)
|
||||
addr_of(cx, C_bytes(cx, &data[..]), "binary")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -30,7 +30,6 @@ use trans::callee;
|
||||
use trans::cleanup;
|
||||
use trans::cleanup::CleanupMethods;
|
||||
use trans::common::*;
|
||||
use trans::consts;
|
||||
use trans::datum;
|
||||
use trans::debuginfo::DebugLoc;
|
||||
use trans::declare;
|
||||
@ -39,8 +38,7 @@ use trans::foreign;
|
||||
use trans::inline;
|
||||
use trans::machine::*;
|
||||
use trans::monomorphize;
|
||||
use trans::tvec;
|
||||
use trans::type_of::{type_of, sizing_type_of, align_of};
|
||||
use trans::type_of::{type_of, type_of_dtor, sizing_type_of, align_of};
|
||||
use trans::type_::Type;
|
||||
use util::ppaux;
|
||||
use util::ppaux::{ty_to_short_str, Repr};
|
||||
@ -191,8 +189,9 @@ pub fn get_drop_glue<'a, 'tcx>(ccx: &CrateContext<'a, 'tcx>, t: Ty<'tcx>) -> Val
|
||||
};
|
||||
|
||||
let fn_nm = mangle_internal_name_by_type_and_seq(ccx, t, "drop");
|
||||
let llfn = decl_cdecl_fn(ccx, &fn_nm, llfnty, ty::mk_nil(ccx.tcx()));
|
||||
note_unique_llvm_symbol(ccx, fn_nm.clone());
|
||||
let llfn = declare::define_cfn(ccx, &fn_nm, llfnty, ty::mk_nil(ccx.tcx())).unwrap_or_else(||{
|
||||
ccx.sess().bug(&format!("symbol `{}` already defined", fn_nm));
|
||||
});
|
||||
ccx.available_drop_glues().borrow_mut().insert(t, fn_nm);
|
||||
|
||||
let _s = StatRecorder::new(ccx, format!("drop {}", ty_to_short_str(ccx.tcx(), t)));
|
||||
|
@ -8,6 +8,7 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
//
|
||||
// error-pattern: symbol `fail` is already defined
|
||||
#![crate_type="rlib"]
|
||||
#![allow(warnings)]
|
||||
|
||||
@ -27,5 +28,4 @@ impl A for B {
|
||||
impl A for C {
|
||||
#[no_mangle]
|
||||
fn fail(self) {}
|
||||
//~^ symbol `fail` is already defined
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user