From 6ea75aea56ab66069b72a29335831f8395e6ee2b Mon Sep 17 00:00:00 2001 From: Matthew Maurer Date: Tue, 25 Oct 2022 15:03:21 -0700 Subject: [PATCH] llvm-16: Don't initialize removed legacy passes LLVM removed initialization for legacy passes: https://reviews.llvm.org/D136615 --- compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp b/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp index 879a3b660b4be..18d37d95a8357 100644 --- a/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp +++ b/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp @@ -69,7 +69,9 @@ extern "C" void LLVMInitializePasses() { initializeAnalysis(Registry); initializeTransformUtils(Registry); initializeInstCombine(Registry); +#if LLVM_VERSION_LT(16, 0) initializeInstrumentation(Registry); +#endif initializeTarget(Registry); }