ldc/ir/irdsymbol.h
David Nadlinger cb341586e3 First merge of 2.064 beta.
This corresponds to DMD commit a913ce4bc59a94a022a27e390fc841f4aededffb.

Doesn't build Phobos yet.
2013-10-29 19:21:15 +01:00

72 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;
class Dsymbol;
class 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