Mercurial > projects > ldc
view ir/irsymbol.h @ 162:1856c62af24b trunk
[svn r178] Fixed codegen values for function arguments, the old approach was completely broken, amazing it even worked...
author | lindquist |
---|---|
date | Mon, 05 May 2008 00:56:53 +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