Skip to content

Commit

Permalink
Always treat #[rustc_std_internal_symbol]s as root TransItems.
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelwoerister committed Nov 7, 2017
1 parent 8fcf3e3 commit d141abf
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/librustc_trans_utils/collector.rs
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,8 @@ use trans_item::{TransItemExt, DefPathBasedNames, InstantiationMode};

use rustc_data_structures::bitvec::BitVector;

use syntax::attr;

#[derive(PartialEq, Eq, Hash, Clone, Copy, Debug)]
pub enum TransItemCollectionMode {
Eager,
Expand Down Expand Up @@ -981,7 +983,9 @@ impl<'b, 'a, 'v> RootCollector<'b, 'a, 'v> {
}
TransItemCollectionMode::Lazy => {
self.entry_fn == Some(def_id) ||
self.tcx.is_exported_symbol(def_id)
self.tcx.is_exported_symbol(def_id) ||
attr::contains_name(&self.tcx.get_attrs(def_id),
"rustc_std_internal_symbol")
}
}
}
Expand Down

0 comments on commit d141abf

Please sign in to comment.