@@ -41,88 +41,89 @@ pub struct Config {
41
41
42
42
macro_rules! debugging_opts(
43
43
( [ $opt: ident ] $cnt: expr ) => (
44
- pub static $opt: uint = 1 << $cnt;
44
+ pub static $opt: u64 = 1 << $cnt;
45
45
) ;
46
46
( [ $opt: ident, $( $rest: ident) ,* ] $cnt: expr ) => (
47
- pub static $opt: uint = 1 << $cnt;
47
+ pub static $opt: u64 = 1 << $cnt;
48
48
debugging_opts!( [ $( $rest) ,* ] $cnt + 1 )
49
49
)
50
50
)
51
51
52
52
debugging_opts ! (
53
53
[
54
- verbose ,
55
- time_passes ,
56
- count_llvm_insns ,
57
- time_llvm_passes ,
58
- trans_stats ,
59
- asm_comments ,
60
- no_verify ,
61
- borrowck_stats ,
62
- no_landing_pads ,
63
- debug_llvm ,
64
- count_type_sizes ,
65
- meta_stats ,
66
- no_opt ,
67
- gc ,
68
- debug_info ,
69
- extra_debug_info ,
70
- print_link_args ,
71
- print_llvm_passes ,
72
- no_vectorize_loops ,
73
- no_vectorize_slp ,
74
- no_prepopulate_passes ,
75
- use_softfp ,
76
- gen_crate_map ,
77
- prefer_dynamic ,
78
- no_integrated_as ,
79
- lto
54
+ VERBOSE ,
55
+ TIME_PASSES ,
56
+ COUNT_LLVM_INSNS ,
57
+ TIME_LLVM_PASSES ,
58
+ TRANS_STATS ,
59
+ ASM_COMMENTS ,
60
+ NO_VERIFY ,
61
+ BORROWCK_STATS ,
62
+ NO_LANDING_PADS ,
63
+ DEBUG_LLVM ,
64
+ COUNT_TYPE_SIZES ,
65
+ META_STATS ,
66
+ NO_OPT ,
67
+ GC ,
68
+ DEBUG_INFO ,
69
+ EXTRA_DEBUG_INFO ,
70
+ PRINT_LINK_ARGS ,
71
+ PRINT_LLVM_PASSES ,
72
+ NO_VECTORIZE_LOOPS ,
73
+ NO_VECTORIZE_SLP ,
74
+ NO_PREPOPULATE_PASSES ,
75
+ USE_SOFTFP ,
76
+ GEN_CRATE_MAP ,
77
+ PREFER_DYNAMIC ,
78
+ NO_INTEGRATED_AS ,
79
+ LTO
80
80
]
81
81
0
82
82
)
83
83
84
- pub fn debugging_opts_map ( ) -> ~[ ( & ' static str , & ' static str , uint ) ] {
85
- ~[ ( "verbose" , "in general, enable more debug printouts" , verbose ) ,
86
- ( "time-passes" , "measure time of each rustc pass" , time_passes ) ,
84
+ pub fn debugging_opts_map ( ) -> ~[ ( & ' static str , & ' static str , u64 ) ] {
85
+ ~[ ( "verbose" , "in general, enable more debug printouts" , VERBOSE ) ,
86
+ ( "time-passes" , "measure time of each rustc pass" , TIME_PASSES ) ,
87
87
( "count-llvm-insns" , "count where LLVM \
88
- instrs originate", count_llvm_insns ) ,
88
+ instrs originate", COUNT_LLVM_INSNS ) ,
89
89
( "time-llvm-passes" , "measure time of each LLVM pass" ,
90
- time_llvm_passes) ,
91
- ( "trans-stats" , "gather trans statistics" , trans_stats) ,
92
- ( "asm-comments" , "generate comments into the assembly (may change behavior)" , asm_comments) ,
93
- ( "no-verify" , "skip LLVM verification" , no_verify) ,
94
- ( "borrowck-stats" , "gather borrowck statistics" , borrowck_stats) ,
90
+ TIME_LLVM_PASSES ) ,
91
+ ( "trans-stats" , "gather trans statistics" , TRANS_STATS ) ,
92
+ ( "asm-comments" , "generate comments into the assembly (may change behavior)" ,
93
+ ASM_COMMENTS ) ,
94
+ ( "no-verify" , "skip LLVM verification" , NO_VERIFY ) ,
95
+ ( "borrowck-stats" , "gather borrowck statistics" , BORROWCK_STATS ) ,
95
96
( "no-landing-pads" , "omit landing pads for unwinding" ,
96
- no_landing_pads ) ,
97
- ( "debug-llvm" , "enable debug output from LLVM" , debug_llvm ) ,
97
+ NO_LANDING_PADS ) ,
98
+ ( "debug-llvm" , "enable debug output from LLVM" , DEBUG_LLVM ) ,
98
99
( "count-type-sizes" , "count the sizes of aggregate types" ,
99
- count_type_sizes) ,
100
- ( "meta-stats" , "gather metadata statistics" , meta_stats) ,
101
- ( "no-opt" , "do not optimize, even if -O is passed" , no_opt) ,
102
- ( "print-link-args" , "Print the arguments passed to the linker" , print_link_args) ,
103
- ( "gc" , "Garbage collect shared data (experimental)" , gc) ,
100
+ COUNT_TYPE_SIZES ) ,
101
+ ( "meta-stats" , "gather metadata statistics" , META_STATS ) ,
102
+ ( "no-opt" , "do not optimize, even if -O is passed" , NO_OPT ) ,
103
+ ( "print-link-args" , "Print the arguments passed to the linker" ,
104
+ PRINT_LINK_ARGS ) ,
105
+ ( "gc" , "Garbage collect shared data (experimental)" , GC ) ,
104
106
( "extra-debug-info" , "Extra debugging info (experimental)" ,
105
- extra_debug_info ) ,
106
- ( "debug-info" , "Produce debug info (experimental)" , debug_info ) ,
107
+ EXTRA_DEBUG_INFO ) ,
108
+ ( "debug-info" , "Produce debug info (experimental)" , DEBUG_INFO ) ,
107
109
( "print-llvm-passes" ,
108
110
"Prints the llvm optimization passes being run" ,
109
- print_llvm_passes ) ,
111
+ PRINT_LLVM_PASSES ) ,
110
112
( "no-prepopulate-passes" ,
111
113
"Don't pre-populate the pass managers with a list of passes, only use \
112
114
the passes from --passes",
113
- no_prepopulate_passes ) ,
115
+ NO_PREPOPULATE_PASSES ) ,
114
116
( "no-vectorize-loops" ,
115
117
"Don't run the loop vectorization optimization passes" ,
116
- no_vectorize_loops) ,
117
- ( "no-vectorize-slp" ,
118
- "Don't run LLVM's SLP vectorization passes" ,
119
- no_vectorize_slp) ,
120
- ( "soft-float" , "Generate software floating point library calls" , use_softfp) ,
121
- ( "gen-crate-map" , "Force generation of a toplevel crate map" , gen_crate_map) ,
122
- ( "prefer-dynamic" , "Prefer dynamic linking to static linking" , prefer_dynamic) ,
118
+ NO_VECTORIZE_LOOPS ) ,
119
+ ( "no-vectorize-slp" , "Don't run LLVM's SLP vectorization passes" ,
120
+ NO_VECTORIZE_SLP ) ,
121
+ ( "soft-float" , "Generate software floating point library calls" , USE_SOFTFP ) ,
122
+ ( "gen-crate-map" , "Force generation of a toplevel crate map" , GEN_CRATE_MAP ) ,
123
+ ( "prefer-dynamic" , "Prefer dynamic linking to static linking" , PREFER_DYNAMIC ) ,
123
124
( "no-integrated-as" ,
124
- "Use external assembler rather than LLVM's integrated one" , no_integrated_as ) ,
125
- ( "lto" , "Perform LLVM link-time optimizations" , lto ) ,
125
+ "Use external assembler rather than LLVM's integrated one" , NO_INTEGRATED_AS ) ,
126
+ ( "lto" , "Perform LLVM link-time optimizations" , LTO ) ,
126
127
]
127
128
}
128
129
@@ -169,7 +170,7 @@ pub struct Options {
169
170
parse_only : bool ,
170
171
no_trans : bool ,
171
172
no_analysis : bool ,
172
- debugging_opts : uint ,
173
+ debugging_opts : u64 ,
173
174
android_cross_path : Option < ~str > ,
174
175
/// Whether to write dependency files. It's (enabled, optional filename).
175
176
write_dependency_info : ( bool , Option < Path > ) ,
@@ -292,56 +293,56 @@ impl Session_ {
292
293
pub fn diagnostic ( & self ) -> @diagnostic:: SpanHandler {
293
294
self . span_diagnostic
294
295
}
295
- pub fn debugging_opt ( & self , opt : uint ) -> bool {
296
- ( self . opts . debugging_opts & opt) != 0 u
296
+ pub fn debugging_opt ( & self , opt : u64 ) -> bool {
297
+ ( self . opts . debugging_opts & opt) != 0
297
298
}
298
299
// This exists to help with refactoring to eliminate impossible
299
300
// cases later on
300
301
pub fn impossible_case ( & self , sp : Span , msg : & str ) -> ! {
301
302
self . span_bug ( sp, format ! ( "Impossible case reached: {}" , msg) ) ;
302
303
}
303
- pub fn verbose ( & self ) -> bool { self . debugging_opt ( verbose ) }
304
- pub fn time_passes ( & self ) -> bool { self . debugging_opt ( time_passes ) }
304
+ pub fn verbose ( & self ) -> bool { self . debugging_opt ( VERBOSE ) }
305
+ pub fn time_passes ( & self ) -> bool { self . debugging_opt ( TIME_PASSES ) }
305
306
pub fn count_llvm_insns ( & self ) -> bool {
306
- self . debugging_opt ( count_llvm_insns )
307
+ self . debugging_opt ( COUNT_LLVM_INSNS )
307
308
}
308
309
pub fn count_type_sizes ( & self ) -> bool {
309
- self . debugging_opt ( count_type_sizes )
310
+ self . debugging_opt ( COUNT_TYPE_SIZES )
310
311
}
311
312
pub fn time_llvm_passes ( & self ) -> bool {
312
- self . debugging_opt ( time_llvm_passes )
313
+ self . debugging_opt ( TIME_LLVM_PASSES )
313
314
}
314
- pub fn trans_stats ( & self ) -> bool { self . debugging_opt ( trans_stats ) }
315
- pub fn meta_stats ( & self ) -> bool { self . debugging_opt ( meta_stats ) }
316
- pub fn asm_comments ( & self ) -> bool { self . debugging_opt ( asm_comments ) }
317
- pub fn no_verify ( & self ) -> bool { self . debugging_opt ( no_verify ) }
318
- pub fn borrowck_stats ( & self ) -> bool { self . debugging_opt ( borrowck_stats ) }
315
+ pub fn trans_stats ( & self ) -> bool { self . debugging_opt ( TRANS_STATS ) }
316
+ pub fn meta_stats ( & self ) -> bool { self . debugging_opt ( META_STATS ) }
317
+ pub fn asm_comments ( & self ) -> bool { self . debugging_opt ( ASM_COMMENTS ) }
318
+ pub fn no_verify ( & self ) -> bool { self . debugging_opt ( NO_VERIFY ) }
319
+ pub fn borrowck_stats ( & self ) -> bool { self . debugging_opt ( BORROWCK_STATS ) }
319
320
pub fn print_llvm_passes ( & self ) -> bool {
320
- self . debugging_opt ( print_llvm_passes )
321
+ self . debugging_opt ( PRINT_LLVM_PASSES )
321
322
}
322
323
pub fn no_prepopulate_passes ( & self ) -> bool {
323
- self . debugging_opt ( no_prepopulate_passes )
324
+ self . debugging_opt ( NO_PREPOPULATE_PASSES )
324
325
}
325
326
pub fn no_vectorize_loops ( & self ) -> bool {
326
- self . debugging_opt ( no_vectorize_loops )
327
+ self . debugging_opt ( NO_VECTORIZE_LOOPS )
327
328
}
328
329
pub fn no_vectorize_slp ( & self ) -> bool {
329
- self . debugging_opt ( no_vectorize_slp )
330
+ self . debugging_opt ( NO_VECTORIZE_SLP )
330
331
}
331
332
pub fn gen_crate_map ( & self ) -> bool {
332
- self . debugging_opt ( gen_crate_map )
333
+ self . debugging_opt ( GEN_CRATE_MAP )
333
334
}
334
335
pub fn prefer_dynamic ( & self ) -> bool {
335
- self . debugging_opt ( prefer_dynamic )
336
+ self . debugging_opt ( PREFER_DYNAMIC )
336
337
}
337
338
pub fn no_integrated_as ( & self ) -> bool {
338
- self . debugging_opt ( no_integrated_as )
339
+ self . debugging_opt ( NO_INTEGRATED_AS )
339
340
}
340
341
pub fn lto ( & self ) -> bool {
341
- self . debugging_opt ( lto )
342
+ self . debugging_opt ( LTO )
342
343
}
343
344
pub fn no_landing_pads ( & self ) -> bool {
344
- self . debugging_opt ( no_landing_pads )
345
+ self . debugging_opt ( NO_LANDING_PADS )
345
346
}
346
347
347
348
// pointless function, now...
@@ -387,7 +388,7 @@ pub fn basic_options() -> @Options {
387
388
parse_only : false ,
388
389
no_trans : false ,
389
390
no_analysis : false ,
390
- debugging_opts : 0 u ,
391
+ debugging_opts : 0 ,
391
392
android_cross_path : None ,
392
393
write_dependency_info : ( false , None ) ,
393
394
print_metas : ( false , false , false ) ,
0 commit comments