Mercurial > projects > ldc
comparison gen/toir.cpp @ 1031:e594385d7e53
Fixed potential assertion failure in taking address of function as a constant expression.
author | Tomas Lindquist Olsen <tomas.l.olsen@gmail.com> |
---|---|
date | Tue, 03 Mar 2009 17:27:14 +0100 |
parents | 18ad5601dff7 |
children | 01544da4cdd8 |
comparison
equal
deleted
inserted
replaced
1030:3ead5c40b7d6 | 1031:e594385d7e53 |
---|---|
973 return llc; | 973 return llc; |
974 } | 974 } |
975 // static function | 975 // static function |
976 else if (FuncDeclaration* fd = vexp->var->isFuncDeclaration()) | 976 else if (FuncDeclaration* fd = vexp->var->isFuncDeclaration()) |
977 { | 977 { |
978 DtoForceDeclareDsymbol(fd); | |
978 IrFunction* irfunc = fd->ir.irFunc; | 979 IrFunction* irfunc = fd->ir.irFunc; |
979 assert(irfunc); | |
980 return irfunc->func; | 980 return irfunc->func; |
981 } | 981 } |
982 // something else | 982 // something else |
983 else | 983 else |
984 { | 984 { |