This is an automated email from the ASF dual-hosted git repository.

tqchen pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tvm.git


The following commit(s) were added to refs/heads/main by this push:
     new 9d483d462e [LLVM] Update Host.h path (#16373)
9d483d462e is described below

commit 9d483d462e0817010cccee6c1170b1b1a068a6a0
Author: Abhikrant Sharma <[email protected]>
AuthorDate: Wed Jan 10 20:26:08 2024 +0530

    [LLVM] Update Host.h path (#16373)
    
    [LLVM] Update Host.h LLVM header path
    
    Due to LLVM PR https://github.com/llvm/llvm-project/pull/74261, Host.h has 
been moved
    to a new location in LLVM
---
 src/target/llvm/llvm_instance.cc | 4 ++++
 src/target/llvm/llvm_module.cc   | 4 ++++
 2 files changed, 8 insertions(+)

diff --git a/src/target/llvm/llvm_instance.cc b/src/target/llvm/llvm_instance.cc
index 9e88222059..08ba34cc73 100644
--- a/src/target/llvm/llvm_instance.cc
+++ b/src/target/llvm/llvm_instance.cc
@@ -42,7 +42,11 @@
 #include <llvm/Support/CodeGen.h>
 #include <llvm/Support/CommandLine.h>
 #include <llvm/Support/ErrorOr.h>
+#if TVM_LLVM_VERSION >= 180
+#include <llvm/TargetParser/Host.h>
+#else
 #include <llvm/Support/Host.h>
+#endif
 #include <llvm/Support/MemoryBuffer.h>
 #include <llvm/Support/SourceMgr.h>
 #include <llvm/Support/TargetSelect.h>
diff --git a/src/target/llvm/llvm_module.cc b/src/target/llvm/llvm_module.cc
index 4823f2c9ea..62ea797edd 100644
--- a/src/target/llvm/llvm_module.cc
+++ b/src/target/llvm/llvm_module.cc
@@ -41,7 +41,11 @@
 #include <llvm/IR/Module.h>
 #include <llvm/IRReader/IRReader.h>
 #include <llvm/Support/FileSystem.h>
+#if TVM_LLVM_VERSION >= 180
+#include <llvm/TargetParser/Host.h>
+#else
 #include <llvm/Support/Host.h>
+#endif
 #include <llvm/Support/SourceMgr.h>
 #include <llvm/Support/raw_ostream.h>
 #include <llvm/Target/TargetMachine.h>

Reply via email to