[all-commits] [llvm/llvm-project] d91448: [BOLT][NFC] Refactor reset-release to move assignment

Amir Aupov via All-commits all-commits at lists.llvm.org
Thu Jan 13 22:47:40 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: d914486a9aacb8a3bbf8a496be98988d4ac93f19
      https://github.com/llvm/llvm-project/commit/d914486a9aacb8a3bbf8a496be98988d4ac93f19
  Author: Amir Ayupov <aaupov at fb.com>
  Date:   2022-01-13 (Thu, 13 Jan 2022)

  Changed paths:
    M bolt/lib/Profile/DataAggregator.cpp

  Log Message:
  -----------
  [BOLT][NFC] Refactor reset-release to move assignment

Summary:
Follow the clang-tidy suggestion to replace reset-release with move assignment.

Move assignment's effect for unique_ptr:
> Effects: Transfers ownership from `u` to `*this` as if by calling `reset(u.release())`
followed by an assignment from `std::forward<D>(u.get_deleter())`.




More information about the All-commits mailing list