summaryrefslogtreecommitdiff
path: root/llvm/lib/Bitcode/Reader/ValueList.cpp
diff options
context:
space:
mode:
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;
}