[PATCH] D77275: Clean up usages of asserting vector getters in Type
Christopher Tetreault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 3 17:21:45 PDT 2020
ctetreau updated this revision to Diff 254963.
ctetreau added a comment.
Fix rebase SNAFU
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
@@ -4164,7 +4164,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;
}
@@ -4198,8 +4198,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;
}
@@ -5191,8 +5192,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.254963.patch
Type: text/x-patch
Size: 1608 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200404/eba657df/attachment.bin>
More information about the llvm-commits
mailing list