rust/src/librustc_trans/trans
bors 5afa2704a6 Auto merge of #23011 - nagisa:the-war-of-symbol-and-symbol, r=pnkfelix
We provide tools to tell what exact symbols to emit for any fn or static, but
don’t quite check if that won’t cause any issues later on. Some of the issues
include LLVM mangling our names again and our names pointing to wrong locations,
us generating dumb foreign call wrappers, linker errors, extern functions
resolving to different symbols altogether (`extern {fn fail();} fail();` in some
cases calling `fail1()`), etc.

Before the commit we had a function called `note_unique_llvm_symbol`, so it is
clear somebody was aware of the issue at some point, but the function was barely
used, mostly in irrelevant locations.

Along with working on it I took liberty to start refactoring trans/base into
a few smaller modules. The refactoring is incomplete and I hope I will find some
motivation to carry on with it.

This is possibly a [breaking-change] because it makes dumbly written code
properly invalid.

This fixes all those issues about incorrect use of #[no_mangle] being not reported/misreported/ICEd by the compiler.

NB. This PR does not attempt to tackle the parallel codegen issue that was mentioned in https://github.com/rust-lang/rust/pull/22811, but I believe it should be very straightforward in a follow up PR by modifying `trans::declare::get_defined_value` to look at all the contexts.

cc @alexcrichton @huonw @nrc because you commented on the original RFC issue.

EDIT: wow, this became much bigger than I initially intended.
2015-04-12 01:26:53 +00:00
..
_match.rs Auto merge of #23293 - tbu-:pr_additive_multiplicative, r=alexcrichton 2015-04-08 00:42:10 +00:00
adt.rs fallout when bootstrapping rustc. 2015-04-01 22:35:50 +02:00
asm.rs Test fixes and rebase conflicts, round 2 2015-03-23 17:10:19 -07:00
attributes.rs Remove two cases of unecesary match branches 2015-04-03 15:48:07 +03:00
base.rs Rebase fallout 2015-04-04 00:21:58 +03:00
basic_block.rs Fallout out rustc 2015-04-01 11:22:39 -04:00
build.rs Mass rename uint/int to usize/isize 2015-03-26 12:10:22 -07:00
builder.rs Mass rename uint/int to usize/isize 2015-03-26 12:10:22 -07:00
cabi_aarch64.rs Mass rename uint/int to usize/isize 2015-03-26 12:10:22 -07:00
cabi_arm.rs Mass rename uint/int to usize/isize 2015-03-26 12:10:22 -07:00
cabi_mips.rs Mass rename uint/int to usize/isize 2015-03-26 12:10:22 -07:00
cabi_powerpc.rs Mass rename uint/int to usize/isize 2015-03-26 12:10:22 -07:00
cabi_x86_64.rs Mass rename uint/int to usize/isize 2015-03-26 12:10:22 -07:00
cabi_x86_win64.rs
cabi_x86.rs
cabi.rs
callee.rs Introduce trans::declare 2015-04-03 15:48:07 +03:00
cleanup.rs Introduce trans::declare 2015-04-03 15:48:07 +03:00
closure.rs Rebase fallout 2015-04-04 00:21:58 +03:00
common.rs Auto merge of #23011 - nagisa:the-war-of-symbol-and-symbol, r=pnkfelix 2015-04-12 01:26:53 +00:00
consts.rs Rebase fallout 2015-04-04 00:21:58 +03:00
context.rs Introduce trans::declare 2015-04-03 15:48:07 +03:00
controlflow.rs Auto merge of #23011 - nagisa:the-war-of-symbol-and-symbol, r=pnkfelix 2015-04-12 01:26:53 +00:00
datum.rs Fallout out rustc 2015-04-01 11:22:39 -04:00
debuginfo.rs Auto merge of #23011 - nagisa:the-war-of-symbol-and-symbol, r=pnkfelix 2015-04-12 01:26:53 +00:00
declare.rs Address Alex’s comments 2015-04-03 15:48:07 +03:00
expr.rs In librustc*, convert many uses of ast::Ident to ast::Name, fixing much of #6993. 2015-04-03 17:46:08 -05:00
foreign.rs Introduce trans::declare 2015-04-03 15:48:07 +03:00
glue.rs Rebase fallout 2015-04-04 00:21:58 +03:00
inline.rs
intrinsic.rs Implement discriminant_value intrinsic 2015-04-10 12:23:08 +02:00
llrepr.rs
machine.rs Mass rename uint/int to usize/isize 2015-03-26 12:10:22 -07:00
macros.rs
meth.rs Introduce trans::declare 2015-04-03 15:48:07 +03:00
mod.rs Introduce trans::declare 2015-04-03 15:48:07 +03:00
monomorphize.rs Introduce trans::declare 2015-04-03 15:48:07 +03:00
tvec.rs Fallout out rustc 2015-04-01 11:22:39 -04:00
type_.rs Mass rename uint/int to usize/isize 2015-03-26 12:10:22 -07:00
type_of.rs Stabilize std::num 2015-03-31 07:50:25 -07:00
value.rs Fallout out rustc 2015-04-01 11:22:39 -04:00