fix codecheck warnnings

Issue: https://gitee.com/openharmony/arkcompiler_runtime_core/issues/I7VF1P

Signed-off-by: huyunhui <huyunhui1@huawei.com>
This commit is contained in:
huyunhui 2023-08-23 17:19:29 +08:00
parent 605ede86df
commit db35cb2fdf

View File

@ -81,6 +81,7 @@ void PassManagerStatistics::ProcessBeforeRun(const Pass &pass)
if (!pass_stat_stack_.empty()) {
auto top_pass = pass_stat_stack_.top();
ASSERT(allocated_size >= last_allocated_ir_);
ASSERT(top_pass != nullptr);
top_pass->mem_used_ir += allocated_size - last_allocated_ir_;
if (!options.IsCompilerResetLocalAllocator()) {
ASSERT(graph_->GetLocalAllocator()->GetAllocatedSize() >= last_allocated_local_);