gallivm: fix build on LLVM 12 due to LLVMAddConstantPropagationPass removal
[mesa.git] / src / gallium / auxiliary / gallivm / lp_bld_init.c
index 6ebc9ebf25a358c71228593a9c6427c77a6f2273..1eb4892a4a6cf3c6d9465b1d9b1e7d878e5f6c76 100644 (file)
@@ -169,7 +169,9 @@ create_pass_manager(struct gallivm_state *gallivm)
        */
       LLVMAddReassociatePass(gallivm->passmgr);
       LLVMAddPromoteMemoryToRegisterPass(gallivm->passmgr);
+#if LLVM_VERSION_MAJOR <= 11
       LLVMAddConstantPropagationPass(gallivm->passmgr);
+#endif
       LLVMAddInstructionCombiningPass(gallivm->passmgr);
       LLVMAddGVNPass(gallivm->passmgr);
    }