mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-01-14 11:53:13 +01:00
Fixed function literals in static initializers. Changed alignment of delegates from 2*PTRSIZE to just PTRSIZE. Changed errors to go to stderr instead of stdout. Fairly major rewriting of struct/union/class handling, STILL A BIT BUGGY !!!
44 lines
666 B
C
44 lines
666 B
C
#ifndef LDC_IR_IRVAR_H
|
|
#define LDC_IR_IRVAR_H
|
|
|
|
#include "ir/ir.h"
|
|
#include "llvm/Type.h"
|
|
|
|
struct IrVar : IrBase
|
|
{
|
|
IrVar(VarDeclaration* var);
|
|
|
|
VarDeclaration* V;
|
|
llvm::Value* value;
|
|
};
|
|
|
|
// represents a global variable
|
|
struct IrGlobal : IrVar
|
|
{
|
|
IrGlobal(VarDeclaration* v);
|
|
|
|
llvm::PATypeHolder type;
|
|
llvm::Constant* constInit;
|
|
};
|
|
|
|
// represents a local variable variable
|
|
struct IrLocal : IrVar
|
|
{
|
|
IrLocal(VarDeclaration* v);
|
|
|
|
int nestedIndex;
|
|
};
|
|
|
|
// represents an aggregate field variable
|
|
struct IrField : IrVar
|
|
{
|
|
IrField(VarDeclaration* v);
|
|
|
|
unsigned index;
|
|
unsigned unionOffset;
|
|
|
|
llvm::Constant* constInit;
|
|
};
|
|
|
|
#endif
|