File tree 2 files changed +6
-10
lines changed
rustc_codegen_ssa/src/back
2 files changed +6
-10
lines changed Original file line number Diff line number Diff line change @@ -119,11 +119,11 @@ unsafe fn configure_llvm(sess: &Session) {
119
119
120
120
llvm:: LLVMInitializePasses ( ) ;
121
121
122
- let use_new_llvm_pm_plugin_register =
123
- sess . opts . debugging_opts . new_llvm_pass_manager . unwrap_or ( false ) ;
124
-
125
- // Use the legacy pm registration if the new_llvm_pass_manager option isn't explicitly enabled
126
- if !use_new_llvm_pm_plugin_register {
122
+ // Use the legacy plugin registration if we don't use the new pass manager
123
+ if ! should_use_new_llvm_pass_manager (
124
+ & sess . opts . debugging_opts . new_llvm_pass_manager ,
125
+ & sess . target . arch ,
126
+ ) {
127
127
// Register LLVM plugins by loading them into the compiler process.
128
128
for plugin in & sess. opts . debugging_opts . llvm_plugins {
129
129
let lib = Library :: new ( plugin) . unwrap_or_else ( |e| bug ! ( "couldn't load plugin: {}" , e) ) ;
Original file line number Diff line number Diff line change @@ -261,11 +261,7 @@ impl ModuleConfig {
261
261
inline_threshold : sess. opts . cg . inline_threshold ,
262
262
new_llvm_pass_manager : sess. opts . debugging_opts . new_llvm_pass_manager ,
263
263
emit_lifetime_markers : sess. emit_lifetime_markers ( ) ,
264
- llvm_plugins : if sess. opts . debugging_opts . new_llvm_pass_manager . unwrap_or ( false ) {
265
- if_regular ! ( sess. opts. debugging_opts. llvm_plugins. clone( ) , vec![ ] )
266
- } else {
267
- vec ! [ ]
268
- } ,
264
+ llvm_plugins : if_regular ! ( sess. opts. debugging_opts. llvm_plugins. clone( ) , vec![ ] ) ,
269
265
}
270
266
}
271
267
You can’t perform that action at this time.
0 commit comments