From 31e39bd3d47cbfa6d2c99ee1ad7bdabbc648117d Mon Sep 17 00:00:00 2001 From: Eric Christopher Date: Wed, 23 Dec 2009 00:29:49 +0000 Subject: [PATCH] Update docs for bitcode changes. For object size checking we won't work with partial objects so just count the type as a boolean. Update appropriately. llvm-svn: 91954 --- llvm/docs/LangRef.html | 35 ++++++++--------------------------- 1 file changed, 8 insertions(+), 27 deletions(-) diff --git a/llvm/docs/LangRef.html b/llvm/docs/LangRef.html index 45f6f38f598f..526f119a6282 100644 --- a/llvm/docs/LangRef.html +++ b/llvm/docs/LangRef.html @@ -7257,8 +7257,8 @@ LLVM.

Syntax:
-  declare i32 @llvm.objectsize.i32( i8* <ptr>, i32 <type> )
-  declare i64 @llvm.objectsize.i64( i8* <ptr>, i32 <type> )
+  declare i32 @llvm.objectsize.i32( i8* <object>, i1 <type> )
+  declare i64 @llvm.objectsize.i64( i8* <object>, i1 <type> )
 
Overview:
@@ -7267,34 +7267,15 @@ LLVM.

operation like memcpy will either overflow a buffer that corresponds to an object, or b) to determine that a runtime check for overflow isn't necessary. An object in this context means an allocation of a - specific type.

+ specific class, structure, array, or other object.

Arguments:

The llvm.objectsize intrinsic takes two arguments. The first - argument is a pointer to the object ptr. The second argument - is an integer type which ranges from 0 to 3. The first bit in - the type corresponds to a return value based on whole objects, - and the second bit whether or not we return the maximum or minimum - remaining bytes computed.

- - - - - - - - - - - - - - - - - -
00whole object, maximum number of bytes
01partial object, maximum number of bytes
10whole object, minimum number of bytes
11partial object, minimum number of bytes
- + argument is a pointer to or into the object. The second argument + is a boolean 0 or 1. This argument determines whether you want the + maximum (0) or minimum (1) bytes remaining. This needs to be a literal 0 or + 1, variables are not allowed.

+
Semantics:

The llvm.objectsize intrinsic is lowered to either a constant representing the size of the object concerned or i32/i64 -1 or 0