[NFC][IR] Value: assert this->takeName(this)
authorDmitry Vassiliev <dvassiliev@accesssoftek.com>
Sun, 13 Feb 2022 18:47:37 +0000 (21:47 +0300)
committerDmitry Vassiliev <dvassiliev@accesssoftek.com>
Sun, 13 Feb 2022 18:47:37 +0000 (21:47 +0300)
commitd97d4d8d754df16ae9e333c2b97af8e5993b759f
tree5fb3921af1b9c8e7afe77d91a3b73a242cc0568f
parentcd0d095c07b6dc925354cb8a9a54cafe654a6c4d
[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
llvm/lib/IR/Value.cpp