summaryrefslogtreecommitdiff
path: root/llvm/lib/Bitcode/Reader/ValueList.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2021-07-29 20:15:26 +0000
committerDimitry Andric <dim@FreeBSD.org>2021-07-29 20:15:26 +0000
commit344a3780b2e33f6ca763666c380202b18aab72a3 (patch)
treef0b203ee6eb71d7fdd792373e3c81eb18d6934dd /llvm/lib/Bitcode/Reader/ValueList.cpp
parentb60736ec1405bb0a8dd40989f67ef4c93da068ab (diff)
Diffstat (limited to 'llvm/lib/Bitcode/Reader/ValueList.cpp')
-rw-r--r--llvm/lib/Bitcode/Reader/ValueList.cpp12
1 files changed, 3 insertions, 9 deletions
diff --git a/llvm/lib/Bitcode/Reader/ValueList.cpp b/llvm/lib/Bitcode/Reader/ValueList.cpp
index ddfa28c6b1e4..86ed664070f6 100644
--- a/llvm/lib/Bitcode/Reader/ValueList.cpp
+++ b/llvm/lib/Bitcode/Reader/ValueList.cpp
@@ -62,18 +62,15 @@ DEFINE_TRANSPARENT_OPERAND_ACCESSORS(ConstantPlaceHolder, Value)
} // end namespace llvm
-void BitcodeReaderValueList::assignValue(Value *V, unsigned Idx, Type *FullTy) {
+void BitcodeReaderValueList::assignValue(Value *V, unsigned Idx) {
if (Idx == size()) {
- push_back(V, FullTy);
+ push_back(V);
return;
}
if (Idx >= size())
resize(Idx + 1);
- assert(FullTypes[Idx] == nullptr || FullTypes[Idx] == FullTy);
- FullTypes[Idx] = FullTy;
-
WeakTrackingVH &OldV = ValuePtrs[Idx];
if (!OldV) {
OldV = V;
@@ -113,8 +110,7 @@ Constant *BitcodeReaderValueList::getConstantFwdRef(unsigned Idx, Type *Ty) {
return C;
}
-Value *BitcodeReaderValueList::getValueFwdRef(unsigned Idx, Type *Ty,
- Type **FullTy) {
+Value *BitcodeReaderValueList::getValueFwdRef(unsigned Idx, Type *Ty) {
// Bail out for a clearly invalid value.
if (Idx >= RefsUpperBound)
return nullptr;
@@ -126,8 +122,6 @@ Value *BitcodeReaderValueList::getValueFwdRef(unsigned Idx, Type *Ty,
// If the types don't match, it's invalid.
if (Ty && Ty != V->getType())
return nullptr;
- if (FullTy)
- *FullTy = FullTypes[Idx];
return V;
}