From db0790c2fd287e8321bb267fd3a2dd14f9e9f19c Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Mon, 8 Jan 2007 07:55:15 +0000 Subject: Fully specify the type of the llvm.va* intrinsics. This helps resolve Pr1093 llvm-svn: 33009 --- llvm/docs/LangRef.html | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) (limited to 'llvm/docs/LangRef.html') diff --git a/llvm/docs/LangRef.html b/llvm/docs/LangRef.html index 8fb39b12c94..caaf983ef97 100644 --- a/llvm/docs/LangRef.html +++ b/llvm/docs/LangRef.html @@ -3519,18 +3519,20 @@ used.

define i32 %test(i32 %X, ...) { ; Initialize variable argument processing %ap = alloca i8 * - call void %llvm.va_start(i8 ** %ap) + %ap2 = bitcast i8** %ap to i8* + call void %llvm.va_start(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 %llvm.va_copy(i8 ** %aq, i8 ** %ap) - call void %llvm.va_end(i8 ** %aq) + %aq2 = bitcast i8** %aq to i8* + call void %llvm.va_copy(i8 *%aq2, i8* %ap2) + call void %llvm.va_end(i8* %aq2) ; Stop processing of arguments. - call void %llvm.va_end(i8 ** %ap) + call void %llvm.va_end(i8* %ap2) ret i32 %tmp } @@ -3544,7 +3546,7 @@ define i32 %test(i32 %X, ...) {
Syntax:
-
  declare void %llvm.va_start(<va_list>* <arglist>)
+
  declare void %llvm.va_start(i8* <arglist>)
Overview:

The 'llvm.va_start' intrinsic initializes *<arglist> for subsequent use by

Syntax:
-
  declare void %llvm.va_end(<va_list*> <arglist>)
+
  declare void %llvm.va_end(i8* <arglist>)
Overview:
+

The 'llvm.va_end' intrinsic destroys <arglist> which has been initialized previously with llvm.va_start or llvm.va_copy.

+
Arguments:
+

The argument is a va_list to destroy.

+
Semantics:
+

The 'llvm.va_end' intrinsic works just like the va_end macro available in C. In a target-dependent way, it destroys the va_list. Calls to llvm.va_start and llvm.va_copy must be matched exactly with calls to llvm.va_end.

+
@@ -3597,8 +3605,7 @@ with calls to llvm.va_end.

Syntax:
-  declare void %llvm.va_copy(<va_list>* <destarglist>,
-                                          <va_list>* <srcarglist>)
+  declare void %llvm.va_copy(i8* <destarglist>, i8* <srcarglist>)
 
Overview:
-- cgit v1.2.3