[NFC][IR] PHINode: ... and assert in another ctor too

This commit is contained in:
Roman Lebedev 2021-04-27 20:52:44 +03:00
parent 1ebbf84ba4
commit 15f631cc78
No known key found for this signature in database
GPG Key ID: 083C3EBB4A1689E0
1 changed files with 1 additions and 0 deletions

View File

@ -2592,6 +2592,7 @@ class PHINode : public Instruction {
BasicBlock *InsertAtEnd)
: Instruction(Ty, Instruction::PHI, nullptr, 0, InsertAtEnd),
ReservedSpace(NumReservedValues) {
assert(!Ty->isTokenTy() && "PHI nodes cannot have token type!");
setName(NameStr);
allocHungoffUses(ReservedSpace);
}