File tree 1 file changed +2
-16
lines changed
src/librustc_codegen_llvm
1 file changed +2
-16
lines changed Original file line number Diff line number Diff line change @@ -147,18 +147,6 @@ fn strip_x86_address_spaces(data_layout: String) -> String {
147
147
data_layout. replace ( "-p270:32:32-p271:32:32-p272:64:64-" , "-" )
148
148
}
149
149
150
- fn add_x86_address_spaces ( mut data_layout : String ) -> String {
151
- let address_spaces = "-p270:32:32-p271:32:32-p272:64:64" ;
152
- if !data_layout. contains ( address_spaces) && data_layout. starts_with ( "e-m:" ) {
153
- let mut insert_pos = "e-m:?" . len ( ) ;
154
- if data_layout[ insert_pos..] . starts_with ( "-p:32:32" ) {
155
- insert_pos += "-p:32:32" . len ( ) ;
156
- }
157
- data_layout. insert_str ( insert_pos, address_spaces) ;
158
- }
159
- data_layout
160
- }
161
-
162
150
pub unsafe fn create_module (
163
151
tcx : TyCtxt < ' _ > ,
164
152
llcx : & ' ll llvm:: Context ,
@@ -172,11 +160,9 @@ pub unsafe fn create_module(
172
160
if llvm_util:: get_major_version ( ) < 9 {
173
161
target_data_layout = strip_function_ptr_alignment ( target_data_layout) ;
174
162
}
175
- if sess . target . target . arch == "x86" || sess . target . target . arch == "x86_64" {
176
- if llvm_util :: get_major_version ( ) < 10 {
163
+ if llvm_util :: get_major_version ( ) < 10 {
164
+ if sess . target . target . arch == "x86" || sess . target . target . arch == "x86_64" {
177
165
target_data_layout = strip_x86_address_spaces ( target_data_layout) ;
178
- } else {
179
- target_data_layout = add_x86_address_spaces ( target_data_layout) ;
180
166
}
181
167
}
182
168
You can’t perform that action at this time.
0 commit comments