From 500233aef94a5ea910efcd171ddf54e59b939ace Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Mon, 8 Sep 2008 16:45:59 +0000 Subject: Bitcasting two or from aggregate types is not permitted. Update LangRef.html, and teach the verifier to check bitcast instructions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55921 91177308-0d34-0410-b5e6-96231b3b80d8 --- docs/LangRef.html | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'docs') diff --git a/docs/LangRef.html b/docs/LangRef.html index 8994a3559f..1beb670765 100644 --- a/docs/LangRef.html +++ b/docs/LangRef.html @@ -1729,7 +1729,8 @@ following is the syntax for constant expressions:

was stored to memory and read back as TYPE. In other words, no bits change with this operator, just the type. This can be used for conversion of vector types to any other type, as long as they have the same bit width. For - pointers it is only valid to cast to another pointer type. + pointers it is only valid to cast to another pointer type. It is not valid + to bitcast to or from an aggregate type.
getelementptr ( CSTPTR, IDX0, IDX1, ... )
@@ -3808,8 +3809,9 @@ nothing is done (no-op cast).

Arguments:

The 'bitcast' instruction takes a value to cast, which must be -a first class value, and a type to cast it to, which must also be a first class type. The bit sizes of value +a non-aggregate first class value, and a type to cast it to, which must also be +a non-aggregate first class type. The bit sizes of +value and the destination type, ty2, must be identical. If the source type is a pointer, the destination type must also be a pointer. This instruction supports bitwise conversion of vectors to integers and to vectors -- cgit v1.2.3