Skip to content

Commit 267e0c0

Browse files
committed
---
yaml --- r: 130330 b: refs/heads/auto c: 2e7bc0f h: refs/heads/master v: v3
1 parent 2edd9fa commit 267e0c0

File tree

3 files changed

+16
-15
lines changed

3 files changed

+16
-15
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0
1313
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
1414
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1515
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
16-
refs/heads/auto: cf672850df05a05e8bb5785228c408a24e102d32
16+
refs/heads/auto: 2e7bc0f808d9ad874010ac610ad796d07127c458
1717
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167
1818
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c
1919
refs/tags/0.1: b19db808c2793fe2976759b85a355c3ad8c8b336

branches/auto/src/librustc/metadata/encoder.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -892,7 +892,8 @@ fn encode_info_for_method(ecx: &EncodeContext,
892892
IITraitItemRef(local_def(parent_id),
893893
RequiredInlinedTraitItemRef(
894894
&*ast_method)));
895-
} else {
895+
}
896+
if !any_types {
896897
encode_symbol(ecx, rbml_w, m.def_id.node);
897898
}
898899
encode_method_argument_names(rbml_w, &*ast_method.pe_fn_decl());
@@ -1047,7 +1048,8 @@ fn encode_info_for_item(ecx: &EncodeContext,
10471048
encode_attributes(rbml_w, item.attrs.as_slice());
10481049
if tps_len > 0u || should_inline(item.attrs.as_slice()) {
10491050
encode_inlined_item(ecx, rbml_w, IIItemRef(item));
1050-
} else {
1051+
}
1052+
if tps_len == 0 {
10511053
encode_symbol(ecx, rbml_w, item.id);
10521054
}
10531055
encode_visibility(rbml_w, vis);
@@ -1411,9 +1413,8 @@ fn encode_info_for_foreign_item(ecx: &EncodeContext,
14111413
encode_name(rbml_w, nitem.ident.name);
14121414
if abi == abi::RustIntrinsic {
14131415
encode_inlined_item(ecx, rbml_w, IIForeignRef(nitem));
1414-
} else {
1415-
encode_symbol(ecx, rbml_w, nitem.id);
14161416
}
1417+
encode_symbol(ecx, rbml_w, nitem.id);
14171418
}
14181419
ForeignItemStatic(_, mutbl) => {
14191420
if mutbl {

branches/auto/src/librustc/middle/trans/base.rs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2554,6 +2554,15 @@ pub fn create_entry_wrapper(ccx: &CrateContext,
25542554

25552555
fn exported_name(ccx: &CrateContext, id: ast::NodeId,
25562556
ty: ty::t, attrs: &[ast::Attribute]) -> String {
2557+
match ccx.external_srcs().borrow().find(&id) {
2558+
Some(&did) => {
2559+
let sym = csearch::get_symbol(&ccx.sess().cstore, did);
2560+
debug!("found item {} in other crate...", sym);
2561+
return sym;
2562+
}
2563+
None => {}
2564+
}
2565+
25572566
match attr::first_attr_value_str_by_name(attrs, "export_name") {
25582567
// Use provided name
25592568
Some(name) => name.get().to_string(),
@@ -2597,16 +2606,7 @@ pub fn get_item_val(ccx: &CrateContext, id: ast::NodeId) -> ValueRef {
25972606
// using the current crate's name/version
25982607
// information in the hash of the symbol
25992608
debug!("making {}", sym);
2600-
let (sym, is_local) = {
2601-
match ccx.external_srcs().borrow().find(&i.id) {
2602-
Some(&did) => {
2603-
debug!("but found in other crate...");
2604-
(csearch::get_symbol(&ccx.sess().cstore,
2605-
did), false)
2606-
}
2607-
None => (sym, true)
2608-
}
2609-
};
2609+
let is_local = !ccx.external_srcs().borrow().contains_key(&id);
26102610

26112611
// We need the translated value here, because for enums the
26122612
// LLVM type is not fully determined by the Rust type.

0 commit comments

Comments
 (0)