Displaying 1 result from an estimated 1 matches for "mergedpoint".
Did you mean:
mergedpointer
2012 Oct 13
1
[LLVMdev] Accessing merged globals through PointerType
...Great, now in addition I want to use an extra pointer to access the
elements, like this:
struct mergestruct *merged_ptr = &merged;
for (i = 0; i < N; ++i) {
merged_ptr->foo[i] = merged_ptr->bar[i] * merged_ptr->baz[i];
}
So I add something like this after line 153:
PointerType *MergedPointerType = PointerType::get(MergedTy, 0);
GlobalVariable *MergedPointer = new GlobalVariable(M, MergedPointerType,
false,
GlobalValue::ExternalLinkage, MergedGV, "_MergedGlobalsPtr");
This is where I'm stuck. How can I use replaceAllUsesWith() to replace uses
of each global with acces...