From 4b6e635825d43512575fa260c213bd02e739d0c9 Mon Sep 17 00:00:00 2001 From: Krzysztof Parzyszek Date: Wed, 5 Apr 2023 08:26:34 -0500 Subject: [PATCH] [LLVM] Add guard for #include (#14469) The file llvm/Transforms/IPO/PassManagerBuilder.h has been removed in LLVM 17, as a part of the transition to the new pass manager. Add a LLVM version guard around the #include. --- src/target/llvm/codegen_amdgpu.cc | 2 ++ src/target/llvm/codegen_nvptx.cc | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/target/llvm/codegen_amdgpu.cc b/src/target/llvm/codegen_amdgpu.cc index 327f23af2c73..a177aa7f6828 100644 --- a/src/target/llvm/codegen_amdgpu.cc +++ b/src/target/llvm/codegen_amdgpu.cc @@ -42,7 +42,9 @@ #include #include #include +#if TVM_LLVM_VERSION < 170 #include +#endif #include #include #include diff --git a/src/target/llvm/codegen_nvptx.cc b/src/target/llvm/codegen_nvptx.cc index ec561667c1b0..e64a2dc5b93d 100644 --- a/src/target/llvm/codegen_nvptx.cc +++ b/src/target/llvm/codegen_nvptx.cc @@ -45,7 +45,9 @@ #include #include #include +#if TVM_LLVM_VERSION < 170 #include +#endif #include #include