Changeset View
Changeset View
Standalone View
Standalone View
clang/lib/CodeGen/CGObjC.cpp
Show First 20 Lines • Show All 1,743 Lines • ▼ Show 20 Lines | void CodeGenFunction::EmitObjCForCollectionStmt(const ObjCForCollectionStmt &S){ | ||||
// Fetch the countByEnumeratingWithState:objects:count: selector. | // Fetch the countByEnumeratingWithState:objects:count: selector. | ||||
IdentifierInfo *II[] = { | IdentifierInfo *II[] = { | ||||
&CGM.getContext().Idents.get("countByEnumeratingWithState"), | &CGM.getContext().Idents.get("countByEnumeratingWithState"), | ||||
&CGM.getContext().Idents.get("objects"), | &CGM.getContext().Idents.get("objects"), | ||||
&CGM.getContext().Idents.get("count") | &CGM.getContext().Idents.get("count") | ||||
}; | }; | ||||
Selector FastEnumSel = | Selector FastEnumSel = | ||||
CGM.getContext().Selectors.getSelector(llvm::array_lengthof(II), &II[0]); | CGM.getContext().Selectors.getSelector(std::size(II), &II[0]); | ||||
QualType ItemsTy = | QualType ItemsTy = | ||||
getContext().getConstantArrayType(getContext().getObjCIdType(), | getContext().getConstantArrayType(getContext().getObjCIdType(), | ||||
llvm::APInt(32, NumItems), nullptr, | llvm::APInt(32, NumItems), nullptr, | ||||
ArrayType::Normal, 0); | ArrayType::Normal, 0); | ||||
Address ItemsPtr = CreateMemTemp(ItemsTy, "items.ptr"); | Address ItemsPtr = CreateMemTemp(ItemsTy, "items.ptr"); | ||||
// Emit the collection pointer. In ARC, we do a retain. | // Emit the collection pointer. In ARC, we do a retain. | ||||
▲ Show 20 Lines • Show All 2,272 Lines • Show Last 20 Lines |