From b75137d1f4e6c6760f560928a23167fcd076a8ec Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Mon, 8 Jan 2007 07:55:15 +0000 Subject: [PATCH] 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 --- docs/LangRef.html | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/docs/LangRef.html b/docs/LangRef.html index 8fb39b12c94..caaf983ef97 100644 --- a/docs/LangRef.html +++ b/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:
-- 2.34.1