mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-07-22 07:05:22 +02:00
Eliminated the need for resolve, declare, const-init and define lists to drive code generation.
This commit is contained in:
10
ir/ir.h
10
ir/ir.h
@@ -3,10 +3,13 @@
|
||||
#ifndef LDC_IR_IR_H
|
||||
#define LDC_IR_IR_H
|
||||
|
||||
#include <deque>
|
||||
|
||||
#include "ir/irforw.h"
|
||||
#include "root.h"
|
||||
|
||||
struct IRState;
|
||||
struct IrFunction;
|
||||
|
||||
struct IrBase : Object
|
||||
{
|
||||
@@ -15,13 +18,18 @@ struct IrBase : Object
|
||||
|
||||
struct Ir
|
||||
{
|
||||
Ir() : irs(NULL) {}
|
||||
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
|
||||
|
||||
@@ -49,7 +49,7 @@ IRLandingPadInfo::IRLandingPadInfo(Catch* catchstmt, llvm::BasicBlock* end)
|
||||
assert(catchstmt->type);
|
||||
catchType = catchstmt->type->toBasetype()->isClassHandle();
|
||||
assert(catchType);
|
||||
DtoForceDeclareDsymbol(catchType);
|
||||
catchType->codegen(Type::sir);
|
||||
}
|
||||
|
||||
IRLandingPadInfo::IRLandingPadInfo(Statement* finallystmt)
|
||||
|
||||
Reference in New Issue
Block a user