You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by ma...@apache.org on 2021/10/17 10:48:20 UTC

[tvm] branch main updated: llvm 14 and above move TargetRegistry into MC (#9305)

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

masahi 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 d095a96  llvm 14 and above move TargetRegistry into MC (#9305)
d095a96 is described below

commit d095a968dfd6f2f65b506b45da6f091228a8b19a
Author: powderluv <po...@users.noreply.github.com>
AuthorDate: Sun Oct 17 03:47:58 2021 -0700

    llvm 14 and above move TargetRegistry into MC (#9305)
    
    TEST=build with latest llvm
---
 src/target/llvm/llvm_common.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/target/llvm/llvm_common.h b/src/target/llvm/llvm_common.h
index b967c7a..fcc44fb 100644
--- a/src/target/llvm/llvm_common.h
+++ b/src/target/llvm/llvm_common.h
@@ -72,7 +72,11 @@
 #include <llvm/Support/FileSystem.h>
 #include <llvm/Support/Host.h>
 #include <llvm/Support/MemoryBuffer.h>
+#if TVM_LLVM_VERSION >= 140
+#include <llvm/MC/TargetRegistry.h>
+#else
 #include <llvm/Support/TargetRegistry.h>
+#endif
 #include <llvm/Support/TargetSelect.h>
 #include <llvm/Support/raw_ostream.h>
 #include <llvm/Target/TargetMachine.h>