mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-02-14 10:53:14 +01:00
Lots of bugfixes. Added support for special foreach on strings. Added std.array, std.utf, std.ctype and std.uni to phobos. Changed all the .c files in the gen dir to .cpp (it *is* C++ after all)
62 lines
1.0 KiB
C
62 lines
1.0 KiB
C
#ifndef LLVMDC_GEN_ELEM_H
|
|
#define LLVMDC_GEN_ELEM_H
|
|
|
|
#include "dvalue.h"
|
|
typedef DValue elem;
|
|
|
|
/*
|
|
|
|
#include "root.h"
|
|
#include "declaration.h"
|
|
#include "aggregate.h"
|
|
|
|
struct DValue;
|
|
|
|
// represents a value. be it a constant literal, a variable etc.
|
|
// maintains all the information for doing load/store appropriately
|
|
struct elem : Object
|
|
{
|
|
enum {
|
|
NONE,
|
|
VAR,
|
|
VAL,
|
|
FUNC,
|
|
CONST,
|
|
NUL,
|
|
REF,
|
|
SLICE,
|
|
ARRAYLEN
|
|
};
|
|
|
|
public:
|
|
elem(Expression* e);
|
|
virtual ~elem();
|
|
|
|
Expression* exp;
|
|
|
|
llvm::Value* mem;
|
|
llvm::Value* val;
|
|
llvm::Value* arg;
|
|
int type;
|
|
bool inplace;
|
|
bool field;
|
|
unsigned callconv;
|
|
bool isthis;
|
|
bool istypeinfo;
|
|
bool temp;
|
|
|
|
VarDeclaration* vardecl;
|
|
FuncDeclaration* funcdecl;
|
|
|
|
llvm::Value* getValue();
|
|
//llvm::Value* getMemory();
|
|
|
|
DValue* dvalue;
|
|
|
|
bool isNull() {return !(mem || val);}
|
|
};
|
|
|
|
*/
|
|
|
|
#endif // LLVMDC_GEN_ELEM_H
|