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

echuraev 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 ae07437a32 [LLVM] Fix get tm allow_missing check pos (#13591)
ae07437a32 is described below

commit ae07437a32c8addadfec4002426e03a6b2bc8781
Author: wrongtest <[email protected]>
AuthorDate: Mon Dec 12 18:53:15 2022 +0800

    [LLVM] Fix get tm allow_missing check pos (#13591)
    
    Fix get tm allow_missing check pos
---
 src/target/llvm/llvm_instance.cc | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/target/llvm/llvm_instance.cc b/src/target/llvm/llvm_instance.cc
index 44454fc6b9..2aa190ad70 100644
--- a/src/target/llvm/llvm_instance.cc
+++ b/src/target/llvm/llvm_instance.cc
@@ -297,9 +297,9 @@ llvm::TargetMachine* 
LLVMTargetInfo::GetOrCreateTargetMachine(bool allow_missing
         llvm_instance->createTargetMachine(triple_, cpu_, 
GetTargetFeatureString(), target_options_,
                                            reloc_model_, code_model_, 
opt_level_);
     target_machine_ = std::unique_ptr<llvm::TargetMachine>(tm);
-    if (!allow_missing) {
-      ICHECK(target_machine_ != nullptr) << error;
-    }
+  }
+  if (!allow_missing) {
+    ICHECK(target_machine_ != nullptr) << error;
   }
   return target_machine_.get();
 }

Reply via email to