Displaying 1 result from an estimated 1 matches for "elem_ptr".
2014 Oct 28
2
[LLVMdev] Storing values in global variables
...ay, it seems I have to fix my (until now quite careless) use of
the different contexts. And this is where I could need help. The
special case I am stuck at is about storing a value in a global
variable. Here is some code:
IRBuilder<> builder(pi);
Value *elem = builder.CreateCall(...);
Value *elem_ptr = builder.CreateGEP(global_array, idx);
builder.CreateStore(get_crypted_funcptr(func, builder), elem_ptr);
I get a IRBuilder before some instruction (pi) in main. The element I
want to store (elem) is created by some call instruction which I
create via the builder. To store elem in global_array, I...