You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by sa...@apache.org on 2024/03/30 11:13:53 UTC

(tvm) branch main updated: [LLVM] Fix compilation failure due to minor change (#16812)

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

sanirudh 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 5053a4f29f [LLVM] Fix compilation failure due to minor change (#16812)
5053a4f29f is described below

commit 5053a4f29fe487eca971496094e92a4a50a5cd61
Author: Anirudh Sundar Subramaniam <qu...@quicinc.com>
AuthorDate: Sat Mar 30 16:43:48 2024 +0530

    [LLVM] Fix compilation failure due to minor change (#16812)
    
    This is just a minor fix where the recent [PR #16425](https://github.com/apache/tvm/pull/16425) seems
    to have missed this change for LLVM 18 and above, and so we're running
    into a compilaion failure.
---
 src/target/llvm/llvm_instance.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/target/llvm/llvm_instance.cc b/src/target/llvm/llvm_instance.cc
index 4b13c8525f..bd2eee85b0 100644
--- a/src/target/llvm/llvm_instance.cc
+++ b/src/target/llvm/llvm_instance.cc
@@ -313,7 +313,7 @@ LLVMTargetInfo::LLVMTargetInfo(LLVMInstance& instance, const TargetJSON& target)
   }
 #else
   if (maybe_level.defined()) {
-    int level = maybe_level.value()->value;
+    int level = maybe_level->value;
     if (level <= 0) {
       opt_level_ = llvm::CodeGenOptLevel::None;
     } else if (level == 1) {