[all-commits] [llvm/llvm-project] 69eb7e: Free the memory allocated by mlirOperationStateAdd...

Jing Pu via All-commits all-commits at lists.llvm.org
Mon Aug 10 01:33:09 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 69eb7e36aa3c71997811054bb31d4546b08bfff0
      https://github.com/llvm/llvm-project/commit/69eb7e36aa3c71997811054bb31d4546b08bfff0
  Author: Jing Pu <jingpu at google.com>
  Date:   2020-08-10 (Mon, 10 Aug 2020)

  Changed paths:
    M mlir/lib/CAPI/IR/IR.cpp

  Log Message:
  -----------
  Free the memory allocated by mlirOperationStateAddXXX methods in mlirOperationCreate.

Previously, the memory leaks on heap. Since the MlirOperationState is not intended to be used again after mlirOperationCreate, the patch simplify frees the memory in mlirOperationCreate instead of creating any new API.

Reviewed By: ftynse

Differential Revision: https://reviews.llvm.org/D85629




More information about the All-commits mailing list