diff --git a/llvm/include/llvm/IR/Instructions.h b/llvm/include/llvm/IR/Instructions.h index 650746c02838..4aa34b07773a 100644 --- a/llvm/include/llvm/IR/Instructions.h +++ b/llvm/include/llvm/IR/Instructions.h @@ -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); }