[llvm] 15f631c - [NFC][IR] PHINode: ... and assert in another ctor too
Roman Lebedev via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 27 10:53:28 PDT 2021
Author: Roman Lebedev
Date: 2021-04-27T20:52:44+03:00
New Revision: 15f631cc78f8f2458b6da97eb20236023d452192
URL: https://github.com/llvm/llvm-project/commit/15f631cc78f8f2458b6da97eb20236023d452192
DIFF: https://github.com/llvm/llvm-project/commit/15f631cc78f8f2458b6da97eb20236023d452192.diff
LOG: [NFC][IR] PHINode: ... and assert in another ctor too
Added:
Modified:
llvm/include/llvm/IR/Instructions.h
Removed:
################################################################################
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);
}
More information about the llvm-commits
mailing list