diff options
| author | bors <bors@rust-lang.org> | 2018-12-07 20:04:06 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2018-12-07 20:04:06 +0000 |
| commit | 4a45578bc58ff262864f72680cc02e83f5d2f5b3 (patch) | |
| tree | 4adb79b3a93aab5d3f97dfe0f80ff9041f73fed8 /src/librustc_codegen_llvm | |
| parent | a40fdeddd81965ee08344fbdd2dbdc04adf24561 (diff) | |
| parent | a70babed03d58d042024e41f0a46f7e33e34d0d1 (diff) | |
| download | rust-4a45578bc58ff262864f72680cc02e83f5d2f5b3.tar.gz rust-4a45578bc58ff262864f72680cc02e83f5d2f5b3.zip | |
Auto merge of #56502 - Zoxc:hir-func, r=eddyb
Use a function to access the Hir map to be able to turn it into a query later r? @eddyb
Diffstat (limited to 'src/librustc_codegen_llvm')
| -rw-r--r-- | src/librustc_codegen_llvm/consts.rs | 4 | ||||
| -rw-r--r-- | src/librustc_codegen_llvm/debuginfo/gdb.rs | 2 | ||||
| -rw-r--r-- | src/librustc_codegen_llvm/debuginfo/mod.rs | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/src/librustc_codegen_llvm/consts.rs b/src/librustc_codegen_llvm/consts.rs index 5311a6a3730..a4baa332fe2 100644 --- a/src/librustc_codegen_llvm/consts.rs +++ b/src/librustc_codegen_llvm/consts.rs @@ -223,10 +223,10 @@ impl CodegenCx<'ll, 'tcx> { debug!("get_static: sym={} instance={:?}", sym, instance); - let g = if let Some(id) = self.tcx.hir.as_local_node_id(def_id) { + let g = if let Some(id) = self.tcx.hir().as_local_node_id(def_id) { let llty = self.layout_of(ty).llvm_type(self); - let (g, attrs) = match self.tcx.hir.get(id) { + let (g, attrs) = match self.tcx.hir().get(id) { Node::Item(&hir::Item { ref attrs, span, node: hir::ItemKind::Static(..), .. }) => { diff --git a/src/librustc_codegen_llvm/debuginfo/gdb.rs b/src/librustc_codegen_llvm/debuginfo/gdb.rs index 4be93d826b8..ff5ec20254e 100644 --- a/src/librustc_codegen_llvm/debuginfo/gdb.rs +++ b/src/librustc_codegen_llvm/debuginfo/gdb.rs @@ -76,7 +76,7 @@ pub fn get_or_insert_gdb_debug_scripts_section_global(cx: &CodegenCx<'ll, '_>) pub fn needs_gdb_debug_scripts_section(cx: &CodegenCx) -> bool { let omit_gdb_pretty_printer_section = - attr::contains_name(&cx.tcx.hir.krate_attrs(), + attr::contains_name(&cx.tcx.hir().krate_attrs(), "omit_gdb_pretty_printer_section"); !omit_gdb_pretty_printer_section && diff --git a/src/librustc_codegen_llvm/debuginfo/mod.rs b/src/librustc_codegen_llvm/debuginfo/mod.rs index 78bdf678f67..e54e180224e 100644 --- a/src/librustc_codegen_llvm/debuginfo/mod.rs +++ b/src/librustc_codegen_llvm/debuginfo/mod.rs @@ -300,7 +300,7 @@ impl DebugInfoMethods<'tcx> for CodegenCx<'ll, 'tcx> { let mut flags = DIFlags::FlagPrototyped; - let local_id = self.tcx().hir.as_local_node_id(def_id); + let local_id = self.tcx().hir().as_local_node_id(def_id); if let Some((id, _, _)) = *self.sess().entry_fn.borrow() { if local_id == Some(id) { flags |= DIFlags::FlagMainSubprogram; |
