about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src
diff options
context:
space:
mode:
authorAxel Cohen <axel.cohen@eshard.com>2021-11-24 14:23:29 +0100
committerAxel Cohen <axel.cohen@eshard.com>2021-12-13 10:43:02 +0100
commit75d1208df8f76a39135574231065e4761859b7d8 (patch)
tree5a0e462ab9ae1dc61e21c6bce42c1a18075e232b /compiler/rustc_codegen_llvm/src
parentc4f29fa0ed738b52e7d8ef372c2d09300755dfef (diff)
downloadrust-75d1208df8f76a39135574231065e4761859b7d8.tar.gz
rust-75d1208df8f76a39135574231065e4761859b7d8.zip
Fix conditions for using legacy or new pm plugins
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
-rw-r--r--compiler/rustc_codegen_llvm/src/llvm_util.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_codegen_llvm/src/llvm_util.rs b/compiler/rustc_codegen_llvm/src/llvm_util.rs
index af53b35d815..ace8e0516ed 100644
--- a/compiler/rustc_codegen_llvm/src/llvm_util.rs
+++ b/compiler/rustc_codegen_llvm/src/llvm_util.rs
@@ -123,7 +123,7 @@ unsafe fn configure_llvm(sess: &Session) {
         sess.opts.debugging_opts.new_llvm_pass_manager.unwrap_or(false);
 
     // Use the legacy pm registration if the new_llvm_pass_manager option isn't explicitly enabled
-    if use_new_llvm_pm_plugin_register {
+    if !use_new_llvm_pm_plugin_register {
         // Register LLVM plugins by loading them into the compiler process.
         for plugin in &sess.opts.debugging_opts.llvm_plugins {
             let lib = Library::new(plugin).unwrap_or_else(|e| bug!("couldn't load plugin: {}", e));