This commit is contained in:
Christian Kamm
2008-07-23 20:27:35 +02:00
2 changed files with 7 additions and 3 deletions

View File

@@ -2036,7 +2036,9 @@ struct AsmProcessor
}
} else if (exp->op == TOKvar) {
VarDeclaration * v = ((VarExp *) exp)->var->isVarDeclaration();
v->needsStorage = true;
if (v) {
v->needsStorage = true;
}
if (v && v->storage_class & STCfield) {
operand->constDisplacement += v->offset;

View File

@@ -254,10 +254,12 @@ DValue* VarExp::toElem(IRState* p)
else if (FuncDeclaration* fdecl = var->isFuncDeclaration())
{
Logger::println("FuncDeclaration");
if (fdecl->llvmInternal != LLVMva_arg) {// && fdecl->llvmValue == 0)
LLValue* func = 0;
if (fdecl->llvmInternal != LLVMva_arg) {
DtoForceDeclareDsymbol(fdecl);
func = fdecl->ir.irFunc->func;
}
return new DFuncValue(fdecl, fdecl->ir.irFunc->func);
return new DFuncValue(fdecl, func);
}
else if (SymbolDeclaration* sdecl = var->isSymbolDeclaration())
{