[LLVMdev] How to define a global variable?

Rob Nikander rob.nikander at gmail.com
Thu Jan 13 05:36:36 PST 2011


On Thu, Jan 13, 2011 at 2:34 AM, Frits van Bommel <fvbommel at gmail.com> wrote:
> On Wed, Jan 12, 2011 at 11:28 PM, Rob Nikander <rob.nikander at gmail.com> wrote:
>
> First, replace %0* with a concrete type (like the i8* in your later post).
> Then give @x an initializer. 'undef' is good enough if you don't want
> to assign an actual value yet. This should turn it into a definition
> instead of a declaration.

Thanks, the initializer did it.  Using opaque* works, at least in this
case; but I've replaced it with i8*.

Rob



More information about the llvm-dev mailing list