[PATCH] D77275: Clean up usages of asserting vector getters in Type
Christopher Tetreault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 8 16:52:34 PDT 2020
This revision was automatically updated to reflect the committed changes.
Closed by commit rGfe69eb119657: Clean up usages of asserting vector getters in Type (authored by ctetreau).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D77275/new/
https://reviews.llvm.org/D77275
Files:
llvm/lib/Bitcode/Reader/BitcodeReader.cpp
Index: llvm/lib/Bitcode/Reader/BitcodeReader.cpp
===================================================================
--- llvm/lib/Bitcode/Reader/BitcodeReader.cpp
+++ llvm/lib/Bitcode/Reader/BitcodeReader.cpp
@@ -4168,7 +4168,7 @@
if (!Vec->getType()->isVectorTy())
return error("Invalid type for value");
I = ExtractElementInst::Create(Vec, Idx);
- FullTy = FullTy->getVectorElementType();
+ FullTy = cast<VectorType>(FullTy)->getElementType();
InstructionList.push_back(I);
break;
}
@@ -4202,8 +4202,9 @@
return error("Invalid type for value");
I = new ShuffleVectorInst(Vec1, Vec2, Mask);
- FullTy = VectorType::get(FullTy->getVectorElementType(),
- Mask->getType()->getVectorElementCount());
+ FullTy =
+ VectorType::get(cast<VectorType>(FullTy)->getElementType(),
+ cast<VectorType>(Mask->getType())->getElementCount());
InstructionList.push_back(I);
break;
}
@@ -5195,8 +5196,8 @@
!FullTy->isPointerTy() && !isa<StructType>(FullTy) &&
!isa<ArrayType>(FullTy) &&
(!isa<VectorType>(FullTy) ||
- FullTy->getVectorElementType()->isFloatingPointTy() ||
- FullTy->getVectorElementType()->isIntegerTy()) &&
+ cast<VectorType>(FullTy)->getElementType()->isFloatingPointTy() ||
+ cast<VectorType>(FullTy)->getElementType()->isIntegerTy()) &&
"Structured types must be assigned with corresponding non-opaque "
"pointer type");
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D77275.256147.patch
Type: text/x-patch
Size: 1608 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200408/47e8d698/attachment.bin>
More information about the llvm-commits
mailing list