Files
ldc/ir/irdsymbol.h
David Nadlinger 1242be25d0 Remove unused, empty Ir type.
The codegen parameter was changed to IRState instead of
removing it to set the stage for an eventual eradication
of the gIR global.
2013-10-13 19:44:29 +02:00

73 lines
1.4 KiB
C++
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
//===-- ir/irdsymbol.h - Codegen state for D symbols ------------*- C++ -*-===//
//
// LDC the LLVM D compiler
//
// This file is distributed under the BSD-style LDC license. See the LICENSE
// file for details.
//
//===----------------------------------------------------------------------===//
//
// Represents the status of a D symbol on its way though the codegen process.
//
//===----------------------------------------------------------------------===//
#ifndef LDC_IR_IRDSYMBOL_H
#define LDC_IR_IRDSYMBOL_H
#include <set>
struct IrModule;
struct IrFunction;
struct IrAggr;
struct IrGlobal;
struct IrLocal;
struct IrParameter;
struct IrField;
struct IrVar;
struct Dsymbol;
struct Module;
namespace llvm {
class Value;
}
struct IrDsymbol
{
static std::set<IrDsymbol*> list;
static void resetAll();
// overload all of these to make sure
// the static list is up to date
IrDsymbol();
IrDsymbol(const IrDsymbol& s);
~IrDsymbol();
void reset();
Module* DModule;
bool resolved;
bool declared;
bool initialized;
bool defined;
IrModule* irModule;
IrAggr* irAggr;
IrFunction* irFunc;
IrGlobal* irGlobal;
union {
IrLocal* irLocal;
IrParameter *irParam;
};
IrField* irField;
IrVar* getIrVar();
llvm::Value*& getIrValue();
bool isSet();
};
#endif