Displaying 1 result from an estimated 1 matches for "llvmconstgep".
2013 Apr 09
1
[LLVMdev] How to get a pointer to a constant struct?
...ke a pointer to: { void(%A*)* null, void (%A*)* @main }
store %VTable* %2, %VTable** %1
ret void
}
How would I do the "somehow make a pointer to" part? I currently make
the constant named struct by using LLVMConstNamedStruct(passing in
%VTable, [null, @main]) and have tried using LLVMConstGEP with [0] as
the indices on this but both times I get an assertion error saying:
"Assertion failed: getOperand(0)->getType() ==
cast<PointerType>(getOperand(1)->getType())->getElementType() && "Ptr
must be a pointer to Val type!", file I
nstructions.cpp, lin...