Don't try to generate function code for functions without bodies

This commit is contained in:
Wolfgang (Blub) Bumiller 2012-08-22 12:33:24 +02:00
parent fd835931af
commit 5390782d9b

5
ir.c
View file

@ -2598,6 +2598,11 @@ static bool gen_global_function_code(ir_builder *ir, ir_value *global)
ir_function *irfun;
irfun = global->constval.vfunc;
if (!irfun) {
/* this was a function pointer, don't generate code for those */
return true;
}
if (irfun->builtin)
return true;