We don't need to check SymbolExportLevel

This commit is contained in:
hyd-dev 2021-05-30 20:49:44 +08:00
parent 382295cd47
commit b054a19f94
No known key found for this signature in database
GPG Key ID: 74FA7FD5B8DA14B8

View File

@ -154,8 +154,9 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
|(num, &linkage)| (linkage != Linkage::NotLinked).then_some(CrateNum::new(num + 1)),
))
{
// FIXME: Do we need to check `SymbolExportLevel` (the `_` below)?
for &(symbol, _) in tcx.exported_symbols(cnum) {
// We can ignore `_export_level` here: we are a Rust crate, and everything is exported
// from a Rust crate.
for &(symbol, _export_level) in tcx.exported_symbols(cnum) {
if let ExportedSymbol::NonGeneric(def_id) = symbol {
let attrs = tcx.codegen_fn_attrs(def_id);
let symbol_name = if let Some(export_name) = attrs.export_name {