Skip to content

Commit

Permalink
[LLVM] Add guard for #include <llvm/Transforms/IPO/PassManagerBuilder…
Browse files Browse the repository at this point in the history
….h> (#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.
  • Loading branch information
Krzysztof Parzyszek authored Apr 5, 2023
1 parent 9dcd40d commit 4b6e635
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/target/llvm/codegen_amdgpu.cc
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@
#include <llvm/Support/SourceMgr.h>
#include <llvm/Support/raw_ostream.h>
#include <llvm/Target/TargetMachine.h>
#if TVM_LLVM_VERSION < 170
#include <llvm/Transforms/IPO/PassManagerBuilder.h>
#endif
#include <llvm/Transforms/Utils/Cloning.h>
#include <tvm/runtime/c_runtime_api.h>
#include <tvm/runtime/device_api.h>
Expand Down
2 changes: 2 additions & 0 deletions src/target/llvm/codegen_nvptx.cc
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,9 @@
#include <llvm/Support/SourceMgr.h>
#include <llvm/Support/raw_ostream.h>
#include <llvm/Target/TargetMachine.h>
#if TVM_LLVM_VERSION < 170
#include <llvm/Transforms/IPO/PassManagerBuilder.h>
#endif
#include <tvm/runtime/device_api.h>

#include <memory>
Expand Down

0 comments on commit 4b6e635

Please sign in to comment.