ldc/gen/arrays.h
Tomas Lindquist Olsen 8b83eda2a2 [svn r261] Fixed debug info for integer and floating local variables, can now be inspected in GDB.
Did a lot of smaller cleans up here and there.
Replaced more llvm::Foo with LLFoo for common stuff.
Split up tollvm.cpp.
2008-06-09 09:37:08 +02:00

45 lines
1.7 KiB
C

#ifndef LLVMC_GEN_ARRAYS_H
#define LLVMC_GEN_ARRAYS_H
struct DSliceValue;
const llvm::StructType* DtoArrayType(Type* arrayTy);
const llvm::StructType* DtoArrayType(const LLType* elemTy);
const llvm::ArrayType* DtoStaticArrayType(Type* sarrayTy);
LLConstant* DtoConstArrayInitializer(ArrayInitializer* si);
LLConstant* DtoConstSlice(LLConstant* dim, LLConstant* ptr);
LLConstant* DtoConstStaticArray(const LLType* 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 LLType* elemty, const LLType* newelemty);
LLValue* DtoArrayLen(DValue* v);
LLValue* DtoArrayPtr(DValue* v);
DValue* DtoCastArray(DValue* val, Type* to);
#endif // LLVMC_GEN_ARRAYS_H