Fixed ldc1 compilation

This commit is contained in:
Alexey Prokhin
2011-07-26 09:30:36 +04:00
parent 46c241009d
commit a41b822420
5 changed files with 11 additions and 0 deletions

View File

@@ -175,6 +175,7 @@ struct Expression : Object
#if IN_LLVM
virtual DValue* toElem(IRState* irs);
DValue *toElemDtor(IRState *irs);
virtual llvm::Constant *toConstElem(IRState *irs);
virtual void cacheLvalue(IRState* irs);

View File

@@ -32,7 +32,9 @@ IRState::IRState(IRState *irs, Statement *s)
sthis = irs->sthis;
blx = irs->blx;
deferToObj = irs->deferToObj;
#if DMDV2
varsInScope = irs->varsInScope;
#endif
}
else
{
@@ -42,7 +44,9 @@ IRState::IRState(IRState *irs, Statement *s)
sthis = NULL;
blx = NULL;
deferToObj = NULL;
#if DMDV2
varsInScope = NULL;
#endif
}
}

View File

@@ -37,7 +37,9 @@ struct IRState
Array *deferToObj; // array of Dsymbol's to run toObjFile(int multiobj) on later
elem *ehidden; // transmit hidden pointer to CallExp::toElem()
Symbol *startaddress;
#if DMDV2
Array *varsInScope; // variables that are in scope that will need destruction later
#endif
block *breakBlock;
block *contBlock;

View File

@@ -139,7 +139,9 @@ struct IRState
// basic block scopes
std::vector<IRScope> scopes;
IRScope& scope();
#if DMDV2
std::vector<VarDeclaration*> &varsInScope() { return scope().varsInScope; }
#endif
llvm::BasicBlock* scopebb();
llvm::BasicBlock* scopeend();
bool scopereturned();

View File

@@ -1644,9 +1644,11 @@ void SwitchErrorStatement::toIR(IRState* p)
//////////////////////////////////////////////////////////////////////////////
#if DMDV2
void ImportStatement::toIR(IRState *irs)
{
}
#endif
//////////////////////////////////////////////////////////////////////////////