@@ -45,13 +45,13 @@ use syntax::attr::AttrMetaMethods;
45
45
use syntax:: crateid:: CrateId ;
46
46
47
47
#[ deriving( Clone , Eq ) ]
48
- pub enum output_type {
49
- output_type_none ,
50
- output_type_bitcode ,
51
- output_type_assembly ,
52
- output_type_llvm_assembly ,
53
- output_type_object ,
54
- output_type_exe ,
48
+ pub enum OutputType {
49
+ OutputTypeNone ,
50
+ OutputTypeBitcode ,
51
+ OutputTypeAssembly ,
52
+ OutputTypeLlvmAssembly ,
53
+ OutputTypeObject ,
54
+ OutputTypeExe ,
55
55
}
56
56
57
57
pub fn llvm_err ( sess : Session , msg : ~str ) -> ! {
@@ -86,10 +86,10 @@ pub fn WriteOutputFile(
86
86
pub mod write {
87
87
88
88
use back:: lto;
89
- use back:: link:: { WriteOutputFile , output_type } ;
90
- use back:: link:: { output_type_assembly , output_type_bitcode } ;
91
- use back:: link:: { output_type_exe , output_type_llvm_assembly } ;
92
- use back:: link:: { output_type_object } ;
89
+ use back:: link:: { WriteOutputFile , OutputType } ;
90
+ use back:: link:: { OutputTypeAssembly , OutputTypeBitcode } ;
91
+ use back:: link:: { OutputTypeExe , OutputTypeLlvmAssembly } ;
92
+ use back:: link:: { OutputTypeObject } ;
93
93
use driver:: driver:: CrateTranslation ;
94
94
use driver:: session:: Session ;
95
95
use driver:: session;
@@ -107,7 +107,7 @@ pub mod write {
107
107
108
108
pub fn run_passes ( sess : Session ,
109
109
trans : & CrateTranslation ,
110
- output_type : output_type ,
110
+ output_type : OutputType ,
111
111
output : & Path ) {
112
112
let llmod = trans. module ;
113
113
let llcx = trans. context ;
@@ -225,20 +225,20 @@ pub mod write {
225
225
226
226
time ( sess. time_passes ( ) , "codegen passes" , ( ) , |( ) | {
227
227
match output_type {
228
- output_type_none => { }
229
- output_type_bitcode => {
228
+ OutputTypeNone => { }
229
+ OutputTypeBitcode => {
230
230
output. with_c_str ( |buf| {
231
231
llvm:: LLVMWriteBitcodeToFile ( llmod, buf) ;
232
232
} )
233
233
}
234
- output_type_llvm_assembly => {
234
+ OutputTypeLlvmAssembly => {
235
235
output. with_c_str ( |output| {
236
236
with_codegen ( tm, llmod, |cpm| {
237
237
llvm:: LLVMRustPrintModule ( cpm, llmod, output) ;
238
238
} )
239
239
} )
240
240
}
241
- output_type_assembly => {
241
+ OutputTypeAssembly => {
242
242
with_codegen ( tm, llmod, |cpm| {
243
243
WriteOutputFile ( sess, tm, cpm, llmod, output,
244
244
lib:: llvm:: AssemblyFile ) ;
@@ -248,7 +248,7 @@ pub mod write {
248
248
// could be invoked specially with output_type_assembly,
249
249
// so in this case we still want the metadata object
250
250
// file.
251
- if sess. opts . output_type != output_type_assembly {
251
+ if sess. opts . output_type != OutputTypeAssembly {
252
252
with_codegen ( tm, trans. metadata_module , |cpm| {
253
253
let out = output. with_extension ( "metadata.o" ) ;
254
254
WriteOutputFile ( sess, tm, cpm,
@@ -257,7 +257,7 @@ pub mod write {
257
257
} )
258
258
}
259
259
}
260
- output_type_exe | output_type_object => {
260
+ OutputTypeExe | OutputTypeObject => {
261
261
with_codegen ( tm, llmod, |cpm| {
262
262
WriteOutputFile ( sess, tm, cpm, llmod, output,
263
263
lib:: llvm:: ObjectFile ) ;
0 commit comments