From e38f0946720dc043ec885bce063e1e3e03c4898e Mon Sep 17 00:00:00 2001 From: Larry Gritz Date: Mon, 6 Jan 2025 15:03:27 -0800 Subject: [PATCH] Adjust to make safe for LLVM 11 Signed-off-by: Larry Gritz --- src/liboslexec/llvm_util.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/liboslexec/llvm_util.cpp b/src/liboslexec/llvm_util.cpp index f669903eb..ae0b01ca9 100644 --- a/src/liboslexec/llvm_util.cpp +++ b/src/liboslexec/llvm_util.cpp @@ -1896,6 +1896,10 @@ void LLVM_Util::setup_new_optimization_passes(int optlevel, bool target_host) { #ifdef OSL_LLVM_NEW_PASS_MANAGER +# if OSL_LLVM_VERSION <= 110 +# error "New pass manager not supported in LLVM 11 and earlier" +# endif + OSL_DEV_ONLY(std::cout << "setup_new_optimization_passes " << optlevel); OSL_ASSERT(m_new_pass_manager == nullptr);