diff options
author | Chris Lattner <sabre@nondot.org> | 2007-01-08 07:55:15 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2007-01-08 07:55:15 +0000 |
commit | b75137d1f4e6c6760f560928a23167fcd076a8ec (patch) | |
tree | b388e5ecccc133c892e94f1630366a98b24be7c6 | |
parent | c0974a1344f0c565f0200d28537806bf07b68acf (diff) |
Fully specify the type of the llvm.va* intrinsics. This helps resolve
Pr1093
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33009 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | docs/LangRef.html | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/docs/LangRef.html b/docs/LangRef.html index 8fb39b12c9..caaf983ef9 100644 --- a/docs/LangRef.html +++ b/docs/LangRef.html @@ -3519,18 +3519,20 @@ used.</p> define i32 %test(i32 %X, ...) { ; Initialize variable argument processing %ap = alloca i8 * - call void %<a href="#i_va_start">llvm.va_start</a>(i8 ** %ap) + %ap2 = bitcast i8** %ap to i8* + call void %<a href="#i_va_start">llvm.va_start</a>(i8* %ap2) ; Read a single integer argument %tmp = va_arg i8 ** %ap, i32 ; Demonstrate usage of llvm.va_copy and llvm.va_end %aq = alloca i8 * - call void %<a href="#i_va_copy">llvm.va_copy</a>(i8 ** %aq, i8 ** %ap) - call void %<a href="#i_va_end">llvm.va_end</a>(i8 ** %aq) + %aq2 = bitcast i8** %aq to i8* + call void %<a href="#i_va_copy">llvm.va_copy</a>(i8 *%aq2, i8* %ap2) + call void %<a href="#i_va_end">llvm.va_end</a>(i8* %aq2) ; Stop processing of arguments. - call void %<a href="#i_va_end">llvm.va_end</a>(i8 ** %ap) + call void %<a href="#i_va_end">llvm.va_end</a>(i8* %ap2) ret i32 %tmp } </pre> @@ -3544,7 +3546,7 @@ define i32 %test(i32 %X, ...) { <div class="doc_text"> <h5>Syntax:</h5> -<pre> declare void %llvm.va_start(<va_list>* <arglist>)<br></pre> +<pre> declare void %llvm.va_start(i8* <arglist>)<br></pre> <h5>Overview:</h5> <P>The '<tt>llvm.va_start</tt>' intrinsic initializes <tt>*<arglist></tt> for subsequent use by <tt><a @@ -3572,19 +3574,25 @@ last argument of the function, the compiler can figure that out.</p> <div class="doc_text"> <h5>Syntax:</h5> -<pre> declare void %llvm.va_end(<va_list*> <arglist>)<br></pre> +<pre> declare void %llvm.va_end(i8* <arglist>)<br></pre> <h5>Overview:</h5> + <p>The '<tt>llvm.va_end</tt>' intrinsic destroys <tt><arglist></tt> which has been initialized previously with <tt><a href="#i_va_start">llvm.va_start</a></tt> or <tt><a href="#i_va_copy">llvm.va_copy</a></tt>.</p> + <h5>Arguments:</h5> + <p>The argument is a <tt>va_list</tt> to destroy.</p> + <h5>Semantics:</h5> + <p>The '<tt>llvm.va_end</tt>' intrinsic works just like the <tt>va_end</tt> macro available in C. In a target-dependent way, it destroys the <tt>va_list</tt>. Calls to <a href="#i_va_start"><tt>llvm.va_start</tt></a> and <a href="#i_va_copy"><tt>llvm.va_copy</tt></a> must be matched exactly with calls to <tt>llvm.va_end</tt>.</p> + </div> <!-- _______________________________________________________________________ --> @@ -3597,8 +3605,7 @@ with calls to <tt>llvm.va_end</tt>.</p> <h5>Syntax:</h5> <pre> - declare void %llvm.va_copy(<va_list>* <destarglist>, - <va_list>* <srcarglist>) + declare void %llvm.va_copy(i8* <destarglist>, i8* <srcarglist>) </pre> <h5>Overview:</h5> |