This is an archive of the discontinued LLVM Phabricator instance.

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

Authored by slydiman on Feb 12 2022, 9:50 AM.

Details

Summary

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.

Diff Detail

Event Timeline

slydiman created this revision.Feb 12 2022, 9:50 AM
slydiman requested review of this revision.Feb 12 2022, 9:50 AM
aeubanks accepted this revision.Feb 12 2022, 7:41 PM

nit: I think the added comments aren't necessary, as you said it's already stated in the header file

This revision is now accepted and ready to land.Feb 12 2022, 7:41 PM
This revision was landed with ongoing or failed builds.Feb 13 2022, 10:48 AM
This revision was automatically updated to reflect the committed changes.