mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-01-11 18:33:14 +01:00
Fixed a bunch of the built-in typeinfos for arrays, they did not inherit TypeInfo_Array. Applied patch to tango/text/convert/Layout.d by fvbommel, closes #47 . Cleaned up some type code. Replaced uses of llvm::Type with LLType (a typedef), same for Value and Constant. Fixed a few cases where typeinfo for user structs could be emitted multiple times, seems to still be some cases of this :/
45 lines
1.6 KiB
C
45 lines
1.6 KiB
C
#ifndef LLVMC_GEN_ARRAYS_H
|
|
#define LLVMC_GEN_ARRAYS_H
|
|
|
|
struct DSliceValue;
|
|
|
|
const llvm::StructType* DtoArrayType(Type* t);
|
|
const llvm::ArrayType* DtoStaticArrayType(Type* t);
|
|
|
|
LLConstant* DtoConstArrayInitializer(ArrayInitializer* si);
|
|
LLConstant* DtoConstSlice(LLConstant* dim, LLConstant* ptr);
|
|
LLConstant* DtoConstStaticArray(const llvm::Type* t, LLConstant* c);
|
|
|
|
void DtoArrayCopySlices(DSliceValue* dst, DSliceValue* src);
|
|
void DtoArrayCopyToSlice(DSliceValue* dst, DValue* src);
|
|
|
|
void DtoArrayInit(LLValue* l, LLValue* r);
|
|
void DtoArrayInit(LLValue* ptr, LLValue* dim, LLValue* val);
|
|
void DtoArrayAssign(LLValue* l, LLValue* r);
|
|
void DtoSetArray(LLValue* arr, LLValue* dim, LLValue* ptr);
|
|
void DtoSetArrayToNull(LLValue* v);
|
|
|
|
DSliceValue* DtoNewDynArray(Type* arrayType, DValue* dim, bool defaultInit=true);
|
|
DSliceValue* DtoResizeDynArray(Type* arrayType, DValue* array, DValue* newdim);
|
|
|
|
DSliceValue* DtoCatAssignElement(DValue* arr, Expression* exp);
|
|
DSliceValue* DtoCatAssignArray(DValue* arr, Expression* exp);
|
|
DSliceValue* DtoCatArrays(Type* type, Expression* e1, Expression* e2);
|
|
DSliceValue* DtoCatArrayElement(Type* type, Expression* exp1, Expression* exp2);
|
|
|
|
void DtoStaticArrayCopy(LLValue* dst, LLValue* src);
|
|
|
|
LLValue* DtoArrayEquals(TOK op, DValue* l, DValue* r);
|
|
LLValue* DtoArrayCompare(TOK op, DValue* l, DValue* r);
|
|
|
|
LLValue* DtoDynArrayIs(TOK op, LLValue* l, LLValue* r);
|
|
|
|
LLValue* DtoArrayCastLength(LLValue* len, const llvm::Type* elemty, const llvm::Type* newelemty);
|
|
|
|
LLValue* DtoArrayLen(DValue* v);
|
|
LLValue* DtoArrayPtr(DValue* v);
|
|
|
|
DValue* DtoCastArray(DValue* val, Type* to);
|
|
|
|
#endif // LLVMC_GEN_ARRAYS_H
|