about summary refs log tree commit diff
path: root/src/librustc_codegen_llvm/debuginfo
diff options
context:
space:
mode:
authorJohn Kåre Alsaker <john.kare.alsaker@gmail.com>2018-12-04 13:45:36 +0100
committerJohn Kåre Alsaker <john.kare.alsaker@gmail.com>2018-12-06 17:24:36 +0100
commita70babed03d58d042024e41f0a46f7e33e34d0d1 (patch)
tree78f557eea7a424eba2c1fa75da9a6845c2607bd8 /src/librustc_codegen_llvm/debuginfo
parent367e783e6f66a4dba32decdc68a262953d2f3f1b (diff)
downloadrust-a70babed03d58d042024e41f0a46f7e33e34d0d1.tar.gz
rust-a70babed03d58d042024e41f0a46f7e33e34d0d1.zip
Use a function to access the Hir map to be able to turn it into a query later
Diffstat (limited to 'src/librustc_codegen_llvm/debuginfo')
-rw-r--r--src/librustc_codegen_llvm/debuginfo/gdb.rs2
-rw-r--r--src/librustc_codegen_llvm/debuginfo/mod.rs2
2 files changed, 2 insertions, 2 deletions
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;