diff options
author | Eric Christopher <echristo@apple.com> | 2009-11-30 08:03:53 +0000 |
---|---|---|
committer | Eric Christopher <echristo@apple.com> | 2009-11-30 08:03:53 +0000 |
commit | 0e671491d700af3988b4c905bd3872b565686970 (patch) | |
tree | 17741f87eb8aa240f4b335a5736d3928b35b7a8e /docs/LangRef.html | |
parent | f58e86d762ac469df7c7267a54cf556badc56031 (diff) | |
download | external_llvm-0e671491d700af3988b4c905bd3872b565686970.zip external_llvm-0e671491d700af3988b4c905bd3872b565686970.tar.gz external_llvm-0e671491d700af3988b4c905bd3872b565686970.tar.bz2 |
First pass at llvm.objectsize documentation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90116 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'docs/LangRef.html')
-rw-r--r-- | docs/LangRef.html | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/docs/LangRef.html b/docs/LangRef.html index 17af1b3..5eeea64 100644 --- a/docs/LangRef.html +++ b/docs/LangRef.html @@ -291,6 +291,8 @@ '<tt>llvm.trap</tt>' Intrinsic</a></li> <li><a href="#int_stackprotector"> '<tt>llvm.stackprotector</tt>' Intrinsic</a></li> + <li><a href="#int_objectsize"> + '<tt>llvm.objectsize</tt>' Intrinsic</a></li> </ol> </li> </ol> @@ -7246,6 +7248,41 @@ LLVM</a>.</p> </div> +<!-- _______________________________________________________________________ --> +<div class="doc_subsubsection"> + <a name="int_objectsize">'<tt>llvm.objectsize</tt>' Intrinsic</a> +</div> + +<div class="doc_text"> + +<h5>Syntax:</h5> +<pre> + declare i32 @llvm.objectsize.i32( i8* <ptr>, i32 <type> ) + declare i64 @llvm.objectsize.i64( i8* <ptr>, i32 <type> ) +</pre> + +<h5>Overview:</h5> +<p>The <tt>llvm.objectsize</tt> intrinsic returns the constant number of bytes + from <tt>ptr</tt> to the end of the object <tt>ptr</tt> points to if it + can deduce this at compile time. If there are any side-effects in evaluating + the argument or it cannot deduce which objects <tt>ptr</tt> points to at compile + time the intrinsic returns <tt>(size_t) -1</tt> for <tt>type</tt> 0 + or 1 and <tt>(size_t) 0</tt> for <tt>type</tt> 2 or 3.</p> + +<h5>Arguments:</h5> +<p>The <tt>llvm.objectsize</tt> intrinsic takes two arguments. The first + argument is a pointer to the object <tt>ptr</tt> and an integer <tt>type</tt>. + <tt>type</tt> is an integer ranging from 0 to 3. The lsb corresponds to + a return value based on whole objects, the second bit whether or not we + return the maximum or minimum remaining bytes computed.</p> + +<h5>Semantics:</h5> +<p>The <tt>llvm.objectsize</tt> intrinsic is lowered to either a constant + representing the size of the object concerned or <tt>(size_t) -1</tt> if + it cannot be determined at compile time.</p> + +</div> + <!-- *********************************************************************** --> <hr> <address> |