Files
ldc/gen/elem.h
Tomas Lindquist Olsen 10db08076c [svn r44] Lots of bug fixes.
New array literal support
New array ~= operator support (for single element)
New with statement support
More...
2007-10-19 07:43:21 +02:00

46 lines
842 B
C

#ifndef LLVMDC_GEN_ELEM_H
#define LLVMDC_GEN_ELEM_H
#include "root.h"
#include "declaration.h"
#include "aggregate.h"
// 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();
llvm::Value* mem;
llvm::Value* val;
llvm::Value* arg;
int type;
bool inplace;
bool field;
unsigned callconv;
bool isthis;
VarDeclaration* vardecl;
FuncDeclaration* funcdecl;
llvm::Value* getValue();
//llvm::Value* getMemory();
bool isNull() {return !(mem || val);}
};
#endif // LLVMDC_GEN_ELEM_H