Displaying 1 result from an estimated 1 matches for "barptr".
Did you mean:
b_rptr
2010 Feb 27
3
[LLVMdev] Object layout bug for C++ derived class with long long integer
I have a simple C++ class that looks like this:
struct Foo { Thing *first; Blob *second; unsigned long third; };
Then I have a derived C++ class that look like this:
struct Bar : Foo { long long fourth; }
I generate JIT code to access 'fourth' from a Foo * as follows:
BarPtr = CreateBitCast(FooPtr, BarPtrTy);
FourthPtr = CreateConstGEP2_32(BarPtr, 0, 3);
FourthValue = CreateLoad(FourthPtr);
ConstantValue = ConstantInt::get(FourthValue->getType(), 0x2A4);
ComparisonValue = CreateICmpEQ(FourthValue, ConstantValue);
This appears to work on Linux and MacOSX with LL...