search for: global_val

Displaying 1 result from an estimated 1 matches for "global_val".

Did you mean: global_var
2012 Nov 17
1
[LLVMdev] constant expression as initial value to global
How can I go about evaluating constant expressions and providing them as the initial value to globals? I allow my globals to be initialized by an expression. In C syntax this looks like: int const global_val = const_expr( 1, 2, 3 ); I use the "const_expr" to indicate construction-time constant folding will not be possible. The IR optimizers however will likely reduce this to a single value. My first approach is to simply call a startup function which assigns the values (which is also kind o...