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 8a9aebc  [Runtime][Contrib][Verilator] remove explicit destructor call 
(#7485)
8a9aebc is described below

commit 8a9aebca13f819eb9233509fa53974da08db9b70
Author: Luis Vega <[email protected]>
AuthorDate: Wed Mar 10 07:22:57 2021 -0800

    [Runtime][Contrib][Verilator] remove explicit destructor call (#7485)
---
 src/runtime/contrib/verilator/verilator_runtime.cc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/runtime/contrib/verilator/verilator_runtime.cc 
b/src/runtime/contrib/verilator/verilator_runtime.cc
index bc96b69..5dfb844 100644
--- a/src/runtime/contrib/verilator/verilator_runtime.cc
+++ b/src/runtime/contrib/verilator/verilator_runtime.cc
@@ -80,7 +80,7 @@ VerilatorRuntime::~VerilatorRuntime() {
   auto dealloc = 
reinterpret_cast<VerilatorDeallocFunc>(lib_->GetSymbol("VerilatorDealloc"));
   ICHECK(dealloc != nullptr);
   dealloc(device_);
-  lib_->~VerilatorLibrary();
+  delete lib_;
 }
 
 void VerilatorRuntime::SetLibrary(const std::string& lib_path) { lib_path_ = 
lib_path; }
@@ -108,7 +108,7 @@ void VerilatorRuntime::Init(const Array<NDArray>& consts) {
   // enable profiler
   if (prof_enable_) prof_ = VerilatorProfiler::ThreadLocal();
 
-  // reset verilator device
+  // reset verilator device.
   reset(device_, reset_cycles_);
 
   CHECK_EQ(consts.size(), const_idx_.size())

Reply via email to