[llvm-commits] [llvm] r71230 - /llvm/trunk/include/llvm/Target/TargetData.h
Duncan Sands
baldrick at free.fr
Fri May 8 10:49:49 PDT 2009
Author: baldrick
Date: Fri May 8 12:49:48 2009
New Revision: 71230
URL: http://llvm.org/viewvc/llvm-project?rev=71230&view=rev
Log:
Add some examples to show the difference between
the various notions of type size used in LLVM.
Modified:
llvm/trunk/include/llvm/Target/TargetData.h
Modified: llvm/trunk/include/llvm/Target/TargetData.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Target/TargetData.h?rev=71230&r1=71229&r2=71230&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Target/TargetData.h (original)
+++ llvm/trunk/include/llvm/Target/TargetData.h Fri May 8 12:49:48 2009
@@ -155,6 +155,23 @@
/// Target pointer size, in bits
unsigned char getPointerSizeInBits() const { return 8*PointerMemSize; }
+ /// Size examples:
+ ///
+ /// Type SizeInBits StoreSizeInBits PaddedSizeInBits[*]
+ /// ---- ---------- --------------- ----------------
+ /// i1 1 8 8
+ /// i8 8 8 8
+ /// i19 19 24 32
+ /// i32 32 32 32
+ /// i100 100 104 128
+ /// i128 128 128 128
+ /// Float 32 32 32
+ /// Double 64 64 64
+ /// X86_FP80 80 80 96
+ ///
+ /// [*] The padded size depends on the alignment, and thus on the target.
+ /// These values are for x86-32 linux.
+
/// getTypeSizeInBits - Return the number of bits necessary to hold the
/// specified type. For example, returns 36 for i36 and 80 for x86_fp80.
uint64_t getTypeSizeInBits(const Type* Ty) const;
More information about the llvm-commits
mailing list