From 7a630ef26f3e255574c75452cd84c1425f607245 Mon Sep 17 00:00:00 2001 From: yangzhenyu Date: Wed, 8 Mar 2023 22:45:58 +0800 Subject: [PATCH] fix include Triplet.h bug with LLVM version>= 17 --- src/target/llvm/codegen_blob.cc | 4 ++++ src/target/llvm/codegen_llvm.cc | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/src/target/llvm/codegen_blob.cc b/src/target/llvm/codegen_blob.cc index b67aac480654..01149a1c5943 100644 --- a/src/target/llvm/codegen_blob.cc +++ b/src/target/llvm/codegen_blob.cc @@ -26,7 +26,11 @@ #include #include +#if LLVM_VERSION_MAJOR >= 17 +#include +#else #include +#endif #include #include #include diff --git a/src/target/llvm/codegen_llvm.cc b/src/target/llvm/codegen_llvm.cc index 87b85290b0af..5438aecd753e 100644 --- a/src/target/llvm/codegen_llvm.cc +++ b/src/target/llvm/codegen_llvm.cc @@ -27,7 +27,11 @@ #include #include #include +#if LLVM_VERSION_MAJOR >= 17 +#include +#else #include +#endif #include #if TVM_LLVM_VERSION >= 50 #include