Skip to content

Commit 56639dc

Browse files
author
Aryan Sefidi
committed
remove conditional, use only assert
1 parent 9ad6926 commit 56639dc

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

llvm/lib/IR/Type.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -974,8 +974,9 @@ struct TargetTypeInfo {
974974
template <typename... ArgTys>
975975
TargetTypeInfo(Type *LayoutType, ArgTys... Properties)
976976
: LayoutType(LayoutType), Properties((0 | ... | Properties)) {
977-
if (this->Properties & TargetExtType::CanBeVectorElement)
978-
assert(LayoutType->isSized() && "Vector element type must be sized");
977+
assert((!(this->Properties & TargetExtType::CanBeVectorElement) ||
978+
LayoutType->isSized()) &&
979+
"Vector element type must be sized");
979980
}
980981
};
981982
} // anonymous namespace

0 commit comments

Comments
 (0)