Skip to content

Commit 5a06fbc

Browse files
Update getWithSizeAndScalar comment to specify result on failure.
1 parent 1f462fe commit 5a06fbc

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

llvm/include/llvm/IR/DerivedTypes.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -554,8 +554,9 @@ class VectorType : public Type {
554554
return VectorType::get(VTy->getElementType(), EltCnt * 2);
555555
}
556556

557-
/// This static method returns a VectorType with the same size-in-bits as
558-
/// SizeTy but with an element type that matches the scalar type of EltTy.
557+
/// This static method attempts to construct a VectorType with the same
558+
/// size-in-bits as SizeTy but with an element type that matches the scalar
559+
/// type of EltTy. The VectorType is returned on success, nullptr otherwise.
559560
static VectorType *getWithSizeAndScalar(VectorType *SizeTy, Type *EltTy) {
560561
if (SizeTy->getScalarType() == EltTy->getScalarType())
561562
return SizeTy;

0 commit comments

Comments
 (0)