Displaying 6 results from an estimated 6 matches for "llvmconstinboundsgep".
2010 Jan 11
4
[LLVMdev] Operations on constant array value?
...LVMTypeOf(v), "__string_" +
string_literal_number);
string_literal_number = string_literal_number + 1;
v = LLVMConstString(string_literal, string_literal.Length, 0);
LLVMSetInitializer(g, v);
elements = { LLVMConstInt(LLVMInt32Type(), 0L, 0),
LLVMConstInt(LLVMInt32Type(), 0L, 0) };
return LLVMConstInBoundsGEP(g, elements, 2);
Is it possible to get the address of an element of a constant array or
struct without first initializing a global variable to the constant?
Thanks in advance,
-- James Williams
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.o...
2010 Jan 11
2
[LLVMdev] Operations on constant array value?
...;
> > string_literal_number = string_literal_number + 1;
> > v = LLVMConstString(string_literal, string_literal.Length, 0);
> > LLVMSetInitializer(g, v);
> > elements = { LLVMConstInt(LLVMInt32Type(), 0L, 0),
> > LLVMConstInt(LLVMInt32Type(), 0L, 0) };
> > return LLVMConstInBoundsGEP(g, elements, 2);
> >
> > Is it possible to get the address of an element of a constant array or
> > struct without first initializing a global variable to the constant?
>
> No.
>
OK. I'd have preferred to have to avoid bloating the module symbol table
with global sym...
2010 Jan 11
0
[LLVMdev] Operations on constant array value?
...+
> string_literal_number);
> string_literal_number = string_literal_number + 1;
> v = LLVMConstString(string_literal, string_literal.Length, 0);
> LLVMSetInitializer(g, v);
> elements = { LLVMConstInt(LLVMInt32Type(), 0L, 0),
> LLVMConstInt(LLVMInt32Type(), 0L, 0) };
> return LLVMConstInBoundsGEP(g, elements, 2);
>
> Is it possible to get the address of an element of a constant array or
> struct without first initializing a global variable to the constant?
No.
-Eli
2010 Jan 11
0
[LLVMdev] Operations on constant array value?
...;
> > string_literal_number = string_literal_number + 1;
> > v = LLVMConstString(string_literal, string_literal.Length, 0);
> > LLVMSetInitializer(g, v);
> > elements = { LLVMConstInt(LLVMInt32Type(), 0L, 0),
> > LLVMConstInt(LLVMInt32Type(), 0L, 0) };
> > return LLVMConstInBoundsGEP(g, elements, 2);
> >
> > Is it possible to get the address of an element of a constant array or
> > struct without first initializing a global variable to the constant?
>
> No.
>
> OK. I'd have preferred to have to avoid bloating the module symbol table with glob...
2010 Jan 11
0
[LLVMdev] Operations on constant array value?
...ing_" + string_literal_number);
> string_literal_number = string_literal_number + 1;
> v = LLVMConstString(string_literal, string_literal.Length, 0);
> LLVMSetInitializer(g, v);
> elements = { LLVMConstInt(LLVMInt32Type(), 0L, 0), LLVMConstInt(LLVMInt32Type(), 0L, 0) };
> return LLVMConstInBoundsGEP(g, elements, 2);
>
> Is it possible to get the address of an element of a constant array or struct without first initializing a global variable to the constant?
>
> Thanks in advance,
> -- James Williams
> _______________________________________________
> LLVM Developers mail...
2010 Jan 11
2
[LLVMdev] Operations on constant array value?
...iteral_number = string_literal_number + 1;
>> > v = LLVMConstString(string_literal, string_literal.Length, 0);
>> > LLVMSetInitializer(g, v);
>> > elements = { LLVMConstInt(LLVMInt32Type(), 0L, 0),
>> > LLVMConstInt(LLVMInt32Type(), 0L, 0) };
>> > return LLVMConstInBoundsGEP(g, elements, 2);
>> >
>> > Is it possible to get the address of an element of a constant array or
>> > struct without first initializing a global variable to the constant?
>>
>> No.
>>
>
> OK. I'd have preferred to have to avoid bloating the mo...