Pass a Symbol to check_name, emit_feature_err, and related functions.

This commit is contained in:
Nicholas Nethercote
2019-05-08 13:21:18 +10:00
parent 79602c87b5
commit fb084a48e2
114 changed files with 671 additions and 621 deletions

View File

@@ -9,6 +9,7 @@ use rustc::session::config::DebugInfo;
use rustc_codegen_ssa::traits::*;
use syntax::attr;
use syntax::symbol::sym;
/// Inserts a side-effect free instruction sequence that makes sure that the
@@ -66,8 +67,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(),
"omit_gdb_pretty_printer_section");
attr::contains_name(&cx.tcx.hir().krate_attrs(), sym::omit_gdb_pretty_printer_section);
!omit_gdb_pretty_printer_section &&
cx.sess().opts.debuginfo != DebugInfo::None &&