uint64_t NumBits = VE.computeBitsRequiredForTypeIndicies();
- // Abbrev for TYPE_CODE_POINTER.
- auto Abbv = std::make_shared<BitCodeAbbrev>();
- Abbv->Add(BitCodeAbbrevOp(bitc::TYPE_CODE_POINTER));
- Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, NumBits));
- Abbv->Add(BitCodeAbbrevOp(0)); // Addrspace = 0
- unsigned PtrAbbrev = Stream.EmitAbbrev(std::move(Abbv));
-
// Abbrev for TYPE_CODE_OPAQUE_POINTER.
- Abbv = std::make_shared<BitCodeAbbrev>();
+ auto Abbv = std::make_shared<BitCodeAbbrev>();
Abbv->Add(BitCodeAbbrevOp(bitc::TYPE_CODE_OPAQUE_POINTER));
Abbv->Add(BitCodeAbbrevOp(0)); // Addrspace = 0
unsigned OpaquePtrAbbrev = Stream.EmitAbbrev(std::move(Abbv));
Code = bitc::TYPE_CODE_POINTER;
TypeVals.push_back(VE.getTypeID(PTy->getNonOpaquePointerElementType()));
TypeVals.push_back(AddressSpace);
- if (AddressSpace == 0)
- AbbrevToUse = PtrAbbrev;
}
break;
}