IHqlExpression * convertAddressToValue(IHqlExpression * address, ITypeInfo * columnType) { if (isTypePassedByAddress(columnType) && !columnType->isReference()) { Owned<ITypeInfo> refType = makeReferenceModifier(LINK(columnType)); assertex(address->getOperator() == no_externalcall || refType == address->queryType()); return createValue(no_implicitcast, LINK(refType), LINK(address)); } Owned<ITypeInfo> pointerType = makePointerType(LINK(columnType)); assertex(address->getOperator() == no_externalcall || pointerType == address->queryType()); IHqlExpression * temp = createValue(no_implicitcast, LINK(pointerType), LINK(address)); return createValue(no_deref, LINK(columnType), temp); }
bool storePointerInArray(ITypeInfo * type) { return type->isReference() && isTypePassedByAddress(type); }