Pass a Symbol to check_name, emit_feature_err, and related functions.
This commit is contained in:
@@ -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 &&
|
||||
|
||||
Reference in New Issue
Block a user