File tree Expand file tree Collapse file tree 3 files changed +12
-6
lines changed
librustc_trans/trans/debuginfo Expand file tree Collapse file tree 3 files changed +12
-6
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
8
8
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
9
9
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
10
10
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
11
- refs/heads/auto: ab9b8441468aed505f83a2ddf74454f9cdfeab33
11
+ refs/heads/auto: cd5cf09635c41e3f9b6df79a50c1fb24ee855153
12
12
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c
13
13
refs/tags/0.1: b19db808c2793fe2976759b85a355c3ad8c8b336
14
14
refs/tags/0.2: 1754d02027f2924bed83b0160ee340c7f41d5ea1
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ use dep_graph::{DepGraph, DepNode};
19
19
20
20
use middle:: cstore:: InlinedItem ;
21
21
use middle:: cstore:: InlinedItem as II ;
22
- use middle:: def_id:: DefId ;
22
+ use middle:: def_id:: { CRATE_DEF_INDEX , DefId } ;
23
23
24
24
use syntax:: abi:: Abi ;
25
25
use syntax:: ast:: { self , Name , NodeId , DUMMY_NODE_ID } ;
@@ -388,6 +388,15 @@ impl<'ast> Map<'ast> {
388
388
self . forest . krate ( )
389
389
}
390
390
391
+ /// Get the attributes on the krate. This is preferable to
392
+ /// invoking `krate.attrs` because it registers a tighter
393
+ /// dep-graph access.
394
+ pub fn krate_attrs ( & self ) -> & ' ast [ ast:: Attribute ] {
395
+ let crate_root_def_id = DefId :: local ( CRATE_DEF_INDEX ) ;
396
+ self . dep_graph . read ( DepNode :: Hir ( crate_root_def_id) ) ;
397
+ & self . forest . krate . attrs
398
+ }
399
+
391
400
/// Retrieve the Node corresponding to `id`, panicking if it cannot
392
401
/// be found.
393
402
pub fn get ( & self , id : NodeId ) -> Node < ' ast > {
Original file line number Diff line number Diff line change @@ -90,10 +90,7 @@ pub fn get_or_insert_gdb_debug_scripts_section_global(ccx: &CrateContext)
90
90
91
91
pub fn needs_gdb_debug_scripts_section ( ccx : & CrateContext ) -> bool {
92
92
let omit_gdb_pretty_printer_section =
93
- attr:: contains_name ( & ccx. tcx ( )
94
- . map
95
- . krate ( )
96
- . attrs ,
93
+ attr:: contains_name ( & ccx. tcx ( ) . map . krate_attrs ( ) ,
97
94
"omit_gdb_pretty_printer_section" ) ;
98
95
99
96
!omit_gdb_pretty_printer_section &&
You can’t perform that action at this time.
0 commit comments