[all-commits] [llvm/llvm-project] bc556e: [libc++/abi] Re-remove unnecessary null pointer ch...

Louis Dionne via All-commits all-commits at lists.llvm.org
Fri Jan 8 14:04:09 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: bc556e5685c0f97e79fb7b3c6f15cc5062db8e36
      https://github.com/llvm/llvm-project/commit/bc556e5685c0f97e79fb7b3c6f15cc5062db8e36
  Author: Louis Dionne <ldionne.2 at gmail.com>
  Date:   2021-01-08 (Fri, 08 Jan 2021)

  Changed paths:
    M libcxx/src/new.cpp
    M libcxxabi/src/stdlib_new_delete.cpp

  Log Message:
  -----------
  [libc++/abi] Re-remove unnecessary null pointer checks from operator delete

In 7cd67904f776, we removed the unnecessary nullptr checks from the libc++abi
definition of operator delete, but we forgot to update the definition in
libc++ (damn code duplication!). Then, in d4a1e03c5fb5, I synced the
definitions across libc++ and libc++abi, but I did it the wrong way around.
I re-added the if() checks to libc++abi instead of removing them from libc++.

In ef74f0fdc339, we re-removed the if() check from operator delete, but
only in libc++abi. This patch corrects this mess and removes it
consistently in libc++ and libc++abi.

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




More information about the All-commits mailing list