about summary refs log tree commit diff
path: root/src/librustc_codegen_llvm/debuginfo
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2020-08-08 05:58:57 +0000
committerbors <bors@rust-lang.org>2020-08-08 05:58:57 +0000
commite61621c3078f25365d58cb508cda745007e64d85 (patch)
tree2dcc96f8502beda3081b14d703585bbd6ac4cffe /src/librustc_codegen_llvm/debuginfo
parent1d100ba26cf9afe85a8a30122c568937c4710879 (diff)
parent96dd044827f80b7de3cc1501a80597f41cc388e0 (diff)
downloadrust-e61621c3078f25365d58cb508cda745007e64d85.tar.gz
rust-e61621c3078f25365d58cb508cda745007e64d85.zip
Auto merge of #74932 - nnethercote:rm-ast-session-globals, r=petrochenkov
Remove `librustc_ast` session globals

By moving the data onto `Session`.

r? @petrochenkov
Diffstat (limited to 'src/librustc_codegen_llvm/debuginfo')
-rw-r--r--src/librustc_codegen_llvm/debuginfo/gdb.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/librustc_codegen_llvm/debuginfo/gdb.rs b/src/librustc_codegen_llvm/debuginfo/gdb.rs
index 64d4076cbf0..29edd66049c 100644
--- a/src/librustc_codegen_llvm/debuginfo/gdb.rs
+++ b/src/librustc_codegen_llvm/debuginfo/gdb.rs
@@ -9,7 +9,6 @@ use rustc_codegen_ssa::traits::*;
 use rustc_middle::bug;
 use rustc_session::config::DebugInfo;
 
-use rustc_ast::attr;
 use rustc_span::symbol::sym;
 
 /// Inserts a side-effect free instruction sequence that makes sure that the
@@ -61,8 +60,10 @@ 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(), sym::omit_gdb_pretty_printer_section);
+    let omit_gdb_pretty_printer_section = cx
+        .tcx
+        .sess
+        .contains_name(&cx.tcx.hir().krate_attrs(), sym::omit_gdb_pretty_printer_section);
 
     !omit_gdb_pretty_printer_section
         && cx.sess().opts.debuginfo != DebugInfo::None