[LLVMdev] Implementing sizeof

Gordon Henriksen gordonhenriksen at mac.com
Fri Jul 27 18:14:54 PDT 2007


On 2007-07-27, at 15:00, Sarah Thompson wrote:

> Are reads and writes always guaranteed to be simple types, so the  
> bit width (as given by the Type::getPrimitiveSizeInBits() member  
> function) divided by 8 and rounded up if necessary  is enough? (The  
> latter works well for me too, I just don't want to mess myself up  
> by making assumptions).

Sarah,

Indeed, loads and stores must be of first class type: iN, float,  
double, pointers, or vectors.

http://llvm.org/docs/LangRef.html#i_load
http://llvm.org/docs/LangRef.html#t_primitive

— Gordon

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20070727/083ea401/attachment.html>


More information about the llvm-dev mailing list