From 4a3da13165bc6b54d79d40a1a339cf06117cd650 Mon Sep 17 00:00:00 2001 From: Anirudh Sundar Date: Thu, 28 Mar 2024 20:53:08 +0530 Subject: [PATCH] [LLVM] Fix compilation failure due to minor change 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 b3f55594a25f..a3a070aee4b2 100644 --- a/src/target/llvm/llvm_instance.cc +++ b/src/target/llvm/llvm_instance.cc @@ -311,7 +311,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) {