[NFC][IR] PHINode: ... and assert in another ctor too
authorRoman Lebedev <lebedev.ri@gmail.com>
Tue, 27 Apr 2021 17:52:44 +0000 (20:52 +0300)
committerRoman Lebedev <lebedev.ri@gmail.com>
Tue, 27 Apr 2021 17:52:44 +0000 (20:52 +0300)
llvm/include/llvm/IR/Instructions.h

index 650746c..4aa34b0 100644 (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);
   }