From 8295a0a991c3910e37fa2f20f45973d40f7034af 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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91954 91177308-0d34-0410-b5e6-96231b3b80d8
---
docs/LangRef.html | 35 ++++++++---------------------------
1 file changed, 8 insertions(+), 27 deletions(-)
diff --git a/docs/LangRef.html b/docs/LangRef.html
index 45f6f38f598..526f119a628 100644
--- a/docs/LangRef.html
+++ b/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.
-
-
- 00 |
- whole object, maximum number of bytes |
-
-
- 01 |
- partial object, maximum number of bytes |
-
-
- 10 |
- whole object, minimum number of bytes |
-
-
- 11 |
- partial 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