diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2010-03-30 11:36:44 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2010-03-30 11:36:44 +0000 |
commit | ad4688669579d5d7b025137a095be66936d7ea31 (patch) | |
tree | 0f7986b695e0476a1e228636848628f6d43d3e63 /lib/CodeGen/CGObjC.cpp | |
parent | 30bc7e8e560941f730fd94109e81ac600767b0ab (diff) |
Replace some constant-sized SmallVectors.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99884 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGObjC.cpp')
-rw-r--r-- | lib/CodeGen/CGObjC.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/lib/CodeGen/CGObjC.cpp b/lib/CodeGen/CGObjC.cpp index f40b3d705d..d2b7a242e8 100644 --- a/lib/CodeGen/CGObjC.cpp +++ b/lib/CodeGen/CGObjC.cpp @@ -464,12 +464,13 @@ void CodeGenFunction::EmitObjCForCollectionStmt(const ObjCForCollectionStmt &S){ static const unsigned NumItems = 16; // Get selector - llvm::SmallVector<IdentifierInfo*, 3> II; - II.push_back(&CGM.getContext().Idents.get("countByEnumeratingWithState")); - II.push_back(&CGM.getContext().Idents.get("objects")); - II.push_back(&CGM.getContext().Idents.get("count")); - Selector FastEnumSel = CGM.getContext().Selectors.getSelector(II.size(), - &II[0]); + IdentifierInfo *II[] = { + &CGM.getContext().Idents.get("countByEnumeratingWithState"), + &CGM.getContext().Idents.get("objects"), + &CGM.getContext().Idents.get("count") + }; + Selector FastEnumSel = + CGM.getContext().Selectors.getSelector(llvm::array_lengthof(II), &II[0]); QualType ItemsTy = getContext().getConstantArrayType(getContext().getObjCIdType(), |