/// Retrieve the type arguments of this object type as they were
/// written.
ArrayRef<QualType> getTypeArgsAsWritten() const {
- return ArrayRef<QualType>(getTypeArgStorage(),
+ return llvm::makeArrayRef(getTypeArgStorage(),
ObjCObjectTypeBits.NumTypeArgs);
}
/// Return the list of basic blocks that this terminator can branch to.
ArrayRef<BasicBlock*> successors() {
- return ArrayRef<BasicBlock*>(&TargetBlock, 1);
+ return llvm::makeArrayRef(TargetBlock);
}
template <class V>
/// Return the list of basic blocks that this terminator can branch to.
ArrayRef<BasicBlock*> successors() {
- return ArrayRef<BasicBlock*>(Branches, 2);
+ return llvm::makeArrayRef(Branches);
}
template <class V>
return new (Importer.getToContext())
CallExpr(Importer.getToContext(), ToCallee,
- ArrayRef<Expr*>(ToArgs_Copied, NumArgs), T, E->getValueKind(),
+ llvm::makeArrayRef(ToArgs_Copied, NumArgs), T, E->getValueKind(),
Importer.Import(E->getRParenLoc()));
}
// String pointer.
llvm::Constant *C = nullptr;
if (isUTF16) {
- ArrayRef<uint16_t> Arr = llvm::makeArrayRef<uint16_t>(
+ auto Arr = llvm::makeArrayRef(
reinterpret_cast<uint16_t *>(const_cast<char *>(Entry.first().data())),
Entry.first().size() / 2);
C = llvm::ConstantDataArray::get(VMContext, Arr);
auto &&PartialSpecializations = getPartialSpecializations(Common);
ArrayRef<DeclID> LazySpecializations;
if (auto *LS = Common->LazySpecializations)
- LazySpecializations = ArrayRef<DeclID>(LS + 1, LS + 1 + LS[0]);
+ LazySpecializations = llvm::makeArrayRef(LS + 1, LS + 1 + LS[0]);
// Add a slot to the record for the number of specializations.
unsigned I = Record.size();