[LLVMdev] About the result of getPointerSizeInBits();

空明流转 wuye9036 at gmail.com
Wed May 23 18:43:33 PDT 2012


Hi guys,

Does getPointerSizeInBits need to return sizeof(void*) in Platform?
I found that getPointerSizeInBits return 8 in x86-32 on win7-64, MSVC 2010.

And if I have a struct { i32, i32* }; the structLayout->getElementOffset(1)
return 8, but I think 4 is right.
In generated ASM, the offset of second element is 4.

Thanks.

-- 
Ye Wu
CELL: +86 159 9957 0103
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120524/1240307a/attachment.html>


More information about the llvm-dev mailing list