@@ -41,18 +41,14 @@ pub struct ThinShared<B: WriteBackendMethods> {
41
41
}
42
42
43
43
pub enum LtoModuleCodegen < B : WriteBackendMethods > {
44
- Fat {
45
- module : ModuleCodegen < B :: Module > ,
46
- _serialized_bitcode : Vec < SerializedModule < B :: ModuleBuffer > > ,
47
- } ,
48
-
44
+ Fat ( ModuleCodegen < B :: Module > ) ,
49
45
Thin ( ThinModule < B > ) ,
50
46
}
51
47
52
48
impl < B : WriteBackendMethods > LtoModuleCodegen < B > {
53
49
pub fn name ( & self ) -> & str {
54
50
match * self {
55
- LtoModuleCodegen :: Fat { .. } => "everything" ,
51
+ LtoModuleCodegen :: Fat ( _ ) => "everything" ,
56
52
LtoModuleCodegen :: Thin ( ref m) => m. name ( ) ,
57
53
}
58
54
}
@@ -68,7 +64,7 @@ impl<B: WriteBackendMethods> LtoModuleCodegen<B> {
68
64
cgcx : & CodegenContext < B > ,
69
65
) -> Result < ModuleCodegen < B :: Module > , FatalError > {
70
66
match self {
71
- LtoModuleCodegen :: Fat { mut module, .. } => {
67
+ LtoModuleCodegen :: Fat ( mut module) => {
72
68
B :: optimize_fat ( cgcx, & mut module) ?;
73
69
Ok ( module)
74
70
}
@@ -81,7 +77,7 @@ impl<B: WriteBackendMethods> LtoModuleCodegen<B> {
81
77
pub fn cost ( & self ) -> u64 {
82
78
match * self {
83
79
// Only one module with fat LTO, so the cost doesn't matter.
84
- LtoModuleCodegen :: Fat { .. } => 0 ,
80
+ LtoModuleCodegen :: Fat ( _ ) => 0 ,
85
81
LtoModuleCodegen :: Thin ( ref m) => m. cost ( ) ,
86
82
}
87
83
}
0 commit comments