Mercurial > projects > ldc
view ir/irsymbol.h @ 167:adca7f32fb6d trunk
[svn r183] Fixed broken identity expressions with two pointers of different types.
Fixed broken pointer arithmetic for subtraction (tango.text.Util unittest now passes)
author | lindquist |
---|---|
date | Tue, 06 May 2008 01:23:02 +0200 |
parents | ccd07d9f2ce9 |
children | db9890b3fb64 |
line wrap: on
line source
#ifndef LLVMDC_IR_IRSYMBOL_H #define LLVMDC_IR_IRSYMBOL_H #include "ir/ir.h" struct IrModule; struct IrFunction; struct IrStruct; struct IrGlobal; struct IrLocal; struct IrField; struct IrVar; struct IrDsymbol { Module* DModule; bool resolved; bool declared; bool initialized; bool defined; IrModule* irModule; IrStruct* irStruct; IrFunction* irFunc; IrGlobal* irGlobal; IrLocal* irLocal; IrField* irField; IrVar* getIrVar() { assert(irGlobal || irLocal || irField); return irGlobal ? (IrVar*)irGlobal : irLocal ? (IrVar*)irLocal : (IrVar*)irField; } llvm::Value*& getIrValue() { return getIrVar()->value; } }; #endif