Lines Matching refs:vla
1830 /// \param sizeInChars - the total size of the VLA, in chars
1841 Builder.CreateElementBitCast(dest, CGF.Int8Ty, "vla.begin");
1843 begin.getElementType(), begin.getPointer(), sizeInChars, "vla.end");
1846 llvm::BasicBlock *loopBB = CGF.createBasicBlock("vla-init.loop");
1847 llvm::BasicBlock *contBB = CGF.createBasicBlock("vla-init.cont");
1849 // Make a loop over the VLA. C99 guarantees that the VLA element
1853 llvm::PHINode *cur = Builder.CreatePHI(begin.getType(), 2, "vla.cur");
1865 Builder.CreateInBoundsGEP(CGF.Int8Ty, cur, baseSizeInChars, "vla.next");
1867 // Leave if that's the end of the VLA.
1868 llvm::Value *done = Builder.CreateICmpEQ(next, end, "vla-init.isdone");
1893 const VariableArrayType *vla;
1897 // But note that getTypeInfo returns 0 for a VLA.
1906 vla = vlaType;
1912 vla = nullptr;
1920 // For a VLA, emit a single element, then splat that over the VLA.
1921 if (vla) Ty = getContext().getBaseElementType(vla);
1935 if (vla) return emitNonZeroVLAInit(*this, Ty, DestPtr, SrcPtr, SizeVal);
1982 // If it's a VLA, we have to load the stored size. Note that
1983 // this is the size of the VLA in bytes, not its size in elements.
1989 // which has type T* where T is the first non-VLA element type.
1994 // If we only have VLA components, 'addr' requires no adjustment.
2002 // inside the VLA.
2060 // If we had any VLA dimensions, factor them in.
2068 const VariableArrayType *vla = getContext().getAsVariableArrayType(type);
2069 assert(vla && "type was not a variable array type!");
2070 return getVLASize(vla);
2082 assert(vlaSize && "no size for VLA!");
2099 const VariableArrayType *vla = getContext().getAsVariableArrayType(type);
2100 assert(vla && "type was not a variable array type!");
2101 return getVLAElements1D(vla);
2105 CodeGenFunction::getVLAElements1D(const VariableArrayType *Vla) {
2106 llvm::Value *VlaSize = VLASizeMap[Vla->getSizeExpr()];
2107 assert(VlaSize && "no size for VLA!");
2109 return { VlaSize, Vla->getElementType() };
2118 // We're going to walk down into the type and look for VLA