From 79d8d087a3d911ddcd881e452a7e72a8a7121435 Mon Sep 17 00:00:00 2001 From: Michael Woerister Date: Mon, 2 Jul 2018 16:21:34 +0200 Subject: incr.comp.: Take names of children into account when computing the ICH of a module's HIR. --- src/librustc_codegen_llvm/mono_item.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/librustc_codegen_llvm') diff --git a/src/librustc_codegen_llvm/mono_item.rs b/src/librustc_codegen_llvm/mono_item.rs index 6ba3582f014..c4a23ac653c 100644 --- a/src/librustc_codegen_llvm/mono_item.rs +++ b/src/librustc_codegen_llvm/mono_item.rs @@ -25,11 +25,10 @@ use monomorphize::Instance; use type_of::LayoutLlvmExt; use rustc::hir; use rustc::hir::def::Def; -use rustc::hir::def_id::DefId; +use rustc::hir::def_id::{DefId, LOCAL_CRATE}; use rustc::mir::mono::{Linkage, Visibility}; use rustc::ty::TypeFoldable; use rustc::ty::layout::LayoutOf; -use syntax::attr; use std::fmt; pub use rustc::mir::mono::MonoItem; @@ -173,7 +172,7 @@ fn predefine_fn<'a, 'tcx>(cx: &CodegenCx<'a, 'tcx>, // visibility as we're going to link this object all over the place but // don't want the symbols to get exported. if linkage != Linkage::Internal && linkage != Linkage::Private && - attr::contains_name(cx.tcx.hir.krate_attrs(), "compiler_builtins") { + cx.tcx.is_compiler_builtins(LOCAL_CRATE) { unsafe { llvm::LLVMRustSetVisibility(lldecl, llvm::Visibility::Hidden); } -- cgit 1.4.1-3-g733a5