mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-01-11 18:33:14 +01:00
1. Main include corresponding to .cpp file, if any. 2. DMD and LDC includes. 3. LLVM includes. 4. System includes. Also updated a few include guards to match the default format.
49 lines
970 B
C++
49 lines
970 B
C++
//===-- ir/ir.h - Base definitions for codegen metadata ---------*- C++ -*-===//
|
||
//
|
||
// LDC – the LLVM D compiler
|
||
//
|
||
// This file is distributed under the BSD-style LDC license. See the LICENSE
|
||
// file for details.
|
||
//
|
||
//===----------------------------------------------------------------------===//
|
||
//
|
||
// Declares the base class for all codegen info classes and the top-level Ir
|
||
// class.
|
||
//
|
||
//===----------------------------------------------------------------------===//
|
||
|
||
|
||
#ifndef LDC_IR_IR_H
|
||
#define LDC_IR_IR_H
|
||
|
||
#include "root.h"
|
||
#include "ir/irforw.h"
|
||
#include <deque>
|
||
|
||
struct IRState;
|
||
struct IrFunction;
|
||
|
||
struct IrBase : Object
|
||
{
|
||
virtual ~IrBase() {}
|
||
};
|
||
|
||
class Ir
|
||
{
|
||
public:
|
||
Ir();
|
||
|
||
void setState(IRState* p) { irs = p; }
|
||
IRState* getState() { return irs; }
|
||
|
||
void addFunctionBody(IrFunction* f);
|
||
void emitFunctionBodies();
|
||
|
||
private:
|
||
IRState* irs;
|
||
|
||
std::deque<IrFunction*> functionbodies;
|
||
};
|
||
|
||
#endif
|