rust/src/test/auxiliary
Alex Crichton 0107028991 Resume inlining globals across crates
In #8185 cross-crate condition handlers were fixed by ensuring that globals
didn't start appearing in different crates with different addressed. An
unfortunate side effect of that pull request is that constants weren't inlined
across crates (uint::bits is unknown to everything but libstd).

This commit fixes this inlining by using the `available_eternally` linkage
provided by LLVM. It partially reverts #8185, and then adds support for this
linkage type. The main caveat is that not all statics could be inlined into
other crates. Before this patch, all statics were considered "inlineable items",
but an unfortunate side effect of how we deal with `&static` and `&[static]`
means that these two cases cannot be inlined across crates. The translation of
constants was modified to propogate this condition of whether a constant
should be considered inlineable into other crates.

Closes #9036
2013-09-16 07:29:49 -07:00
..
ambig_impl_2_lib.rs test: Fix tests. rs=tests 2013-03-13 20:08:35 -07:00
anon-extern-mod-cross-crate-1.rs test: Use a test extern in various foreign fn tests 2013-07-30 21:13:55 -07:00
anon_trait_static_method_lib.rs Remove all uses of pub impl. rs=style 2013-06-01 09:18:27 -07:00
cci_borrow_lib.rs test: De-export aux, bench, compile-fail, and run-fail. rs=deexporting 2013-01-30 15:08:45 -08:00
cci_capture_clause.rs Fix warnings it tests 2013-08-17 08:42:35 -07:00
cci_class.rs test: Residual de-muting of the test suite. rs=demuting 2013-02-25 15:15:20 -08:00
cci_class_2.rs Remove all uses of pub impl. rs=style 2013-06-01 09:18:27 -07:00
cci_class_3.rs Remove all uses of pub impl. rs=style 2013-06-01 09:18:27 -07:00
cci_class_4.rs Remove all uses of pub impl. rs=style 2013-06-01 09:18:27 -07:00
cci_class_5.rs Fix warnings it tests 2013-08-17 08:42:35 -07:00
cci_class_6.rs Remove all uses of pub impl. rs=style 2013-06-01 09:18:27 -07:00
cci_class_cast.rs Fix warnings it tests 2013-08-17 08:42:35 -07:00
cci_class_trait.rs test: Residual de-muting of the test suite. rs=demuting 2013-02-25 15:15:20 -08:00
cci_const.rs librustc: Remove the const declaration form everywhere 2013-03-22 22:24:35 -07:00
cci_impl_lib.rs test: Some test fixes 2013-03-13 20:07:11 -07:00
cci_intrinsic.rs librustc: Remove pub extern and priv extern from the language. 2013-07-20 17:39:38 -07:00
cci_iter_lib.rs Rename vec::len(var) to var.len() 2013-05-15 11:05:28 +09:00
cci_nested_lib.rs remove obsolete foreach keyword 2013-08-03 22:48:02 -04:00
cci_no_inline_lib.rs Rename vec::len(var) to var.len() 2013-05-15 11:05:28 +09:00
coherence_inherent_cc_lib.rs Fix bug in coherence that causes all cross-crate impls to be regarded as 2013-03-06 11:02:19 -05:00
crate-method-reexport-grrrrrrr2.rs Fix warnings it tests 2013-08-17 08:42:35 -07:00
crateresolve1-1.rs test: De-export aux, bench, compile-fail, and run-fail. rs=deexporting 2013-01-30 15:08:45 -08:00
crateresolve1-2.rs test: De-export aux, bench, compile-fail, and run-fail. rs=deexporting 2013-01-30 15:08:45 -08:00
crateresolve1-3.rs test: De-export aux, bench, compile-fail, and run-fail. rs=deexporting 2013-01-30 15:08:45 -08:00
crateresolve2-1.rs test: De-export aux, bench, compile-fail, and run-fail. rs=deexporting 2013-01-30 15:08:45 -08:00
crateresolve2-2.rs test: De-export aux, bench, compile-fail, and run-fail. rs=deexporting 2013-01-30 15:08:45 -08:00
crateresolve2-3.rs test: De-export aux, bench, compile-fail, and run-fail. rs=deexporting 2013-01-30 15:08:45 -08:00
crateresolve3-1.rs test: De-export aux, bench, compile-fail, and run-fail. rs=deexporting 2013-01-30 15:08:45 -08:00
crateresolve3-2.rs test: De-export aux, bench, compile-fail, and run-fail. rs=deexporting 2013-01-30 15:08:45 -08:00
crateresolve4a-1.rs test: De-export aux, bench, compile-fail, and run-fail. rs=deexporting 2013-01-30 15:08:45 -08:00
crateresolve4a-2.rs test: De-export aux, bench, compile-fail, and run-fail. rs=deexporting 2013-01-30 15:08:45 -08:00
crateresolve4b-1.rs test: De-export aux, bench, compile-fail, and run-fail. rs=deexporting 2013-01-30 15:08:45 -08:00
crateresolve4b-2.rs test: De-export aux, bench, compile-fail, and run-fail. rs=deexporting 2013-01-30 15:08:45 -08:00
crateresolve5-1.rs Fix warnings it tests 2013-08-17 08:42:35 -07:00
crateresolve5-2.rs Fix warnings it tests 2013-08-17 08:42:35 -07:00
crateresolve7x.rs test: De-export aux, bench, compile-fail, and run-fail. rs=deexporting 2013-01-30 15:08:45 -08:00
crateresolve_calories-1.rs test: De-export aux, bench, compile-fail, and run-fail. rs=deexporting 2013-01-30 15:08:45 -08:00
crateresolve_calories-2.rs test: De-export aux, bench, compile-fail, and run-fail. rs=deexporting 2013-01-30 15:08:45 -08:00
explicit_self_xcrate.rs librustc: Stop reexporting the standard modules from prelude. 2013-05-29 19:04:53 -07:00
extern-crosscrate-source.rs Change type of extern fns from *u8 to extern "ABI" fn 2013-08-21 10:50:37 -04:00
extern_mod_ordering_lib.rs add gitattributes and fix whitespace issues 2013-05-03 20:01:42 -04:00
foreign_lib.rs test: Use a test extern in various foreign fn tests 2013-07-30 21:13:55 -07:00
impl_privacy_xc_1.rs Remove all uses of pub impl. rs=style 2013-06-01 09:18:27 -07:00
impl_privacy_xc_2.rs add gitattributes and fix whitespace issues 2013-05-03 20:01:42 -04:00
inner_static.rs Remove __extensions__ in names for a "pretty name" 2013-09-02 23:12:41 -07:00
iss.rs Fix a typo in the ifmt dox 2013-08-15 14:19:09 -07:00
issue-2380.rs librustc: Don't accept as Trait anymore; fix all occurrences of it. 2013-03-13 20:07:09 -07:00
issue-2414-a.rs add gitattributes and fix whitespace issues 2013-05-03 20:01:42 -04:00
issue-2414-b.rs add gitattributes and fix whitespace issues 2013-05-03 20:01:42 -04:00
issue-2526.rs Fix warnings it tests 2013-08-17 08:42:35 -07:00
issue-2631-a.rs librustc: Remove all uses of "copy". 2013-07-17 14:57:51 -07:00
issue-3012-1.rs Change finalize -> drop. 2013-06-25 21:14:39 -04:00
issue2170lib.rs Change finalize -> drop. 2013-06-25 21:14:39 -04:00
issue2378a.rs Fix warnings it tests 2013-08-17 08:42:35 -07:00
issue2378b.rs librustc: Remove all uses of "copy". 2013-07-17 14:57:51 -07:00
issue4516_ty_param_lib.rs librustc: Remove all uses of "copy". 2013-07-17 14:57:51 -07:00
issue_2242_a.rs librustc: Remove all uses of "copy". 2013-07-17 14:57:51 -07:00
issue_2242_c.rs librustc: Replace impl Type : Trait with impl Trait for Type. rs=implflipping 2013-02-14 14:44:12 -08:00
issue_2316_a.rs Reliciense makefiles and testsuite. Yup. 2012-12-10 17:32:58 -08:00
issue_2316_b.rs Fix warnings it tests 2013-08-17 08:42:35 -07:00
issue_2472_b.rs Remove all uses of pub impl. rs=style 2013-06-01 09:18:27 -07:00
issue_2723_a.rs Remove die!, raplace invocations with fail! Issue #4524 pt 3 2013-02-13 17:01:32 -08:00
issue_3136_a.rc Reliciense makefiles and testsuite. Yup. 2012-12-10 17:32:58 -08:00
issue_3136_a.rs add gitattributes and fix whitespace issues 2013-05-03 20:01:42 -04:00
issue_3882.rc Add test cases: one xfailed, one not 2013-01-10 14:16:02 -08:00
issue_3882.rs add gitattributes and fix whitespace issues 2013-05-03 20:01:42 -04:00
issue_3907.rs Add a bunch of tests for closed issues 2013-08-13 21:32:34 -07:00
issue_3907_1.rs testsuite: Add various test cases 2013-03-27 10:09:02 -07:00
issue_3979_traits.rs Fix the issue-3979 tests and add a new test. 2013-07-23 17:06:56 -07:00
issue_5844_aux.rs Add a test for #5844 (a closed issue now) 2013-07-22 23:09:21 -07:00
issue_8401.rs Add even more tests 2013-08-15 14:22:36 -07:00
issue_9123.rs Translate nested items in default methods 2013-09-13 01:42:44 -07:00
issue_9188.rs Guarantee that statics have unique names 2013-09-14 23:19:11 -07:00
lint_stability.rs Implement support for indicating the stability of items. 2013-09-04 00:12:27 +10:00
moves_based_on_type_lib.rs Fix warnings it tests 2013-08-17 08:42:35 -07:00
nested_item.rs rename std::iterator to std::iter 2013-09-09 03:21:46 -04:00
newtype_struct_xc.rs add gitattributes and fix whitespace issues 2013-05-03 20:01:42 -04:00
no_std_crate.rs Allow linking against crates with #[no_std] 2013-07-25 19:23:17 -07:00
noexporttypelib.rs test: Fix a bunch of compile-fail tests. rs=bustage 2012-12-28 19:36:35 -08:00
packed.rs Fix cross-crate packed structs 2013-05-06 23:35:27 +09:00
private_variant_1.rs librustc: Replace impl Type : Trait with impl Trait for Type. rs=implflipping 2013-02-14 14:44:12 -08:00
private_variant_xc.rs Forbid pub/priv where it has no effect 2013-08-12 23:20:46 -07:00
pub_use_mods_xcrate.rs add gitattributes and fix whitespace issues 2013-05-03 20:01:42 -04:00
pub_use_xcrate1.rs Reliciense makefiles and testsuite. Yup. 2012-12-10 17:32:58 -08:00
pub_use_xcrate2.rs Reliciense makefiles and testsuite. Yup. 2012-12-10 17:32:58 -08:00
reexported_static_methods.rs Forbid pub/priv where it has no effect 2013-08-12 23:20:46 -07:00
static-function-pointer-aux.rs Split cross-crate test into own test and xfail-fast it 2013-08-21 17:29:47 +02:00
static-methods-crate.rs Remove {uint,int,u64,i64,...}::from_str,from_str_radix 2013-09-15 14:29:16 +02:00
static_fn_inline_xc_aux.rs add gitattributes and fix whitespace issues 2013-05-03 20:01:42 -04:00
static_fn_trait_xc_aux.rs test: Remove pure from the test suite 2013-03-22 12:57:28 -07:00
static_mut_xc.rs Add 'static mut' items to the language 2013-06-23 17:59:35 -07:00
struct_destructuring_cross_crate.rs add gitattributes and fix whitespace issues 2013-05-03 20:01:42 -04:00
struct_variant_xc_aux.rs Fix whitespace in tests 2013-09-11 14:49:10 -04:00
trait_default_method_xc_aux.rs Fix warnings it tests 2013-08-17 08:42:35 -07:00
trait_default_method_xc_aux_2.rs Export information about used default methods instead of regenerating it. Closes #7862. 2013-07-18 13:56:15 -07:00
trait_inheritance_auto_xc_2_aux.rs add gitattributes and fix whitespace issues 2013-05-03 20:01:42 -04:00
trait_inheritance_auto_xc_aux.rs librustc: Remove implicit self from the language, except for old-style drop blocks. 2013-03-13 20:07:10 -07:00
trait_inheritance_cross_trait_call_xc_aux.rs librustc: Remove implicit self from the language, except for old-style drop blocks. 2013-03-13 20:07:10 -07:00
trait_inheritance_overloading_xc.rs test: Update tests to use the new syntax. 2013-05-22 21:57:10 -07:00
trait_superkinds_in_metadata.rs Fixup style of test cases for #7083 2013-08-20 13:28:51 -04:00
trait_typedef_cc.rs Reliciense makefiles and testsuite. Yup. 2012-12-10 17:32:58 -08:00
use_from_trait_xc.rs automated whitespace fixes 2013-06-13 18:03:08 -04:00
xc_conditions.rs Add tests for cross-crate condition handling. Close #5446. 2013-08-19 15:09:20 -07:00
xc_conditions_2.rs Add tests for cross-crate condition handling. Close #5446. 2013-08-19 15:09:20 -07:00
xc_conditions_3.rs Add tests for cross-crate condition handling. Close #5446. 2013-08-19 15:09:20 -07:00
xc_conditions_4.rs Fixes #8881. condition! imports parent's pub identifiers 2013-09-03 16:11:00 -07:00
xc_private_method_lib.rs Enable privacy check for enum methods. 2013-08-07 14:30:00 +02:00
xcrate_static_addresses.rs Resume inlining globals across crates 2013-09-16 07:29:49 -07:00
xcrate_unit_struct.rs Fix unit structs in cross-crate situtations 2013-08-07 22:41:13 -04:00