diff options
| author | varkor <github@varkor.com> | 2018-08-22 23:05:26 +0100 |
|---|---|---|
| committer | varkor <github@varkor.com> | 2018-08-27 21:46:13 +0100 |
| commit | 11665ca45a4eb7745026040e840aef3207d5c7ce (patch) | |
| tree | 737250badcf6e25eefde8e2149b23c0ab19ad63c /src/librustc_codegen_llvm | |
| parent | 4b12f700db9da92f9f6a87de86c8927c95869454 (diff) | |
| download | rust-11665ca45a4eb7745026040e840aef3207d5c7ce.tar.gz rust-11665ca45a4eb7745026040e840aef3207d5c7ce.zip | |
Remove path prefixes from NodeKind
Diffstat (limited to 'src/librustc_codegen_llvm')
| -rw-r--r-- | src/librustc_codegen_llvm/back/symbol_export.rs | 9 | ||||
| -rw-r--r-- | src/librustc_codegen_llvm/consts.rs | 6 |
2 files changed, 8 insertions, 7 deletions
diff --git a/src/librustc_codegen_llvm/back/symbol_export.rs b/src/librustc_codegen_llvm/back/symbol_export.rs index d59cf266ee6..dd687890ff1 100644 --- a/src/librustc_codegen_llvm/back/symbol_export.rs +++ b/src/librustc_codegen_llvm/back/symbol_export.rs @@ -13,6 +13,7 @@ use std::sync::Arc; use monomorphize::Instance; use rustc::hir; +use rustc::hir::map::NodeKind; use rustc::hir::CodegenFnAttrFlags; use rustc::hir::def_id::{CrateNum, DefId, LOCAL_CRATE, CRATE_DEF_INDEX}; use rustc_data_structures::fingerprint::Fingerprint; @@ -94,7 +95,7 @@ fn reachable_non_generics_provider<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>, // As a result, if this id is an FFI item (foreign item) then we only // let it through if it's included statically. match tcx.hir.get(node_id) { - hir::map::NodeKind::ForeignItem(..) => { + NodeKind::ForeignItem(..) => { let def_id = tcx.hir.local_def_id(node_id); if tcx.is_statically_included_foreign_item(def_id) { Some(def_id) @@ -104,14 +105,14 @@ fn reachable_non_generics_provider<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>, } // Only consider nodes that actually have exported symbols. - hir::map::NodeKind::Item(&hir::Item { + NodeKind::Item(&hir::Item { node: hir::ItemKind::Static(..), .. }) | - hir::map::NodeKind::Item(&hir::Item { + NodeKind::Item(&hir::Item { node: hir::ItemKind::Fn(..), .. }) | - hir::map::NodeKind::ImplItem(&hir::ImplItem { + NodeKind::ImplItem(&hir::ImplItem { node: hir::ImplItemKind::Method(..), .. }) => { diff --git a/src/librustc_codegen_llvm/consts.rs b/src/librustc_codegen_llvm/consts.rs index b8b5aee510f..921d70e7118 100644 --- a/src/librustc_codegen_llvm/consts.rs +++ b/src/librustc_codegen_llvm/consts.rs @@ -11,7 +11,7 @@ use libc::c_uint; use llvm::{self, SetUnnamedAddr, True}; use rustc::hir::def_id::DefId; -use rustc::hir::map as hir_map; +use rustc::hir::map::NodeKind; use debuginfo; use base; use monomorphize::MonoItem; @@ -135,7 +135,7 @@ pub fn get_static(cx: &CodegenCx<'ll, '_>, def_id: DefId) -> &'ll Value { let llty = cx.layout_of(ty).llvm_type(cx); let (g, attrs) = match cx.tcx.hir.get(id) { - hir_map::NodeKind::Item(&hir::Item { + NodeKind::Item(&hir::Item { ref attrs, span, node: hir::ItemKind::Static(..), .. }) => { if declare::get_declared_value(cx, &sym[..]).is_some() { @@ -153,7 +153,7 @@ pub fn get_static(cx: &CodegenCx<'ll, '_>, def_id: DefId) -> &'ll Value { (g, attrs) } - hir_map::NodeKind::ForeignItem(&hir::ForeignItem { + NodeKind::ForeignItem(&hir::ForeignItem { ref attrs, span, node: hir::ForeignItemKind::Static(..), .. }) => { let fn_attrs = cx.tcx.codegen_fn_attrs(def_id); |
