Displaying 2 results from an estimated 2 matches for "newglobal".
Did you mean:
getglobal
2011 Mar 06
2
[LLVMdev] how to zero-init a global
Hi!
I have a module containing a constant e.g.
@input = global %0 zeroinitializer, align 16
when I copy the global into another module I use
newGlobal->copyAttributesFrom(global);
but the new module now has
@input = external global %0, align 16
i.e. the zeroinitializer is missing. how do I set it or
copy it from the other global?
-Jochen
2011 Mar 06
0
[LLVMdev] how to zero-init a global
On Sun, Mar 6, 2011 at 9:52 PM, Jochen Wilhelmy <j.wilhelmy at arcor.de> wrote:
> I have a module containing a constant e.g.
>
> @input = global %0 zeroinitializer, align 16
>
> when I copy the global into another module I use
> newGlobal->copyAttributesFrom(global);
> but the new module now has
>
> @input = external global %0, align 16
>
> i.e. the zeroinitializer is missing. how do I set it or
> copy it from the other global?
The initializer doesn't count as an attribute, I guess.
if (global->hasInit...