[all-commits] [llvm/llvm-project] d97d4d: [NFC][IR] Value: assert this->takeName(this)

Dmitry Vasilyev via All-commits all-commits at lists.llvm.org
Sun Feb 13 10:48:47 PST 2022

  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: d97d4d8d754df16ae9e333c2b97af8e5993b759f
  Author: Dmitry Vassiliev <dvassiliev at accesssoftek.com>
  Date:   2022-02-13 (Sun, 13 Feb 2022)

  Changed paths:
    M llvm/lib/IR/Value.cpp

  Log Message:
  [NFC][IR] Value: assert this->takeName(this)

Need to add an assert about this->takeName(this). This restriction is already documented, so this is just an NFC check.
Without this assertion (as prescribed by original comments for this API), name deletion or down-stream assert failures may occur in other routines: e.g. at the beginning of replaceAllUsesWith() below.

Reviewed By: aeubanks

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

More information about the All-commits mailing list