llvm.org GIT mirror llvm / 772fccf
clean up and fix the call section. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48651 91177308-0d34-0410-b5e6-96231b3b80d8 Chris Lattner 11 years ago
1 changed file(s) with 10 addition(s) and 12 deletion(s). Raw diff Collapse all Expand all
38183818 the specified values. Upon a 'ret'
38193819 instruction in the called function, control flow continues with the
38203820 instruction after the function call, and the return value of the
3821 function is bound to the result argument. If the 'ret
3822 ' instruction returns multiple values then the return values of the
3823 function are only accessible through a 'getresult
3824 ' instruction. This is a simpler case of
3825 the invoke instruction.

3821 function is bound to the result argument. If the callee returns multiple
3822 values then the return values of the function are only accessible through
3823 the 'getresult' instruction.

38263824
38273825
Example:
38283826
38293827

                  
                
38303828 %retval = call i32 @test(i32 %argc)
3831 call i32 (i8 *, ...)* @printf(i8 * %msg, i32 12, i8 42);
3832 %X = tail call i32 @foo()
3833 %Y = tail call fastcc i32 @foo()
3834 %Z = call void %foo(i8 97 signext)
3829 call i32 (i8 *, ...)* @printf(i8 * %msg, i32 12, i8 42) ; yields i32
3830 %X = tail call i32 @foo() ; yields i32
3831 %Y = tail call fastcc i32 @foo() ; yields i32
3832 call void %foo(i8 97 signext)
38353833
38363834 %struct.A = type { i32, i8 }
3837 %r = call %struct.A @foo()
3838 %gr = getresult %struct.A %r, 0
3839 %gr1 = getresult %struct.A %r, 1
3835 %r = call %struct.A @foo() ; yields { 32, i8 }
3836 %gr = getresult %struct.A %r, 0 ; yields i32
3837 %gr1 = getresult %struct.A %r, 1 ; yields i8
38403838
38413839
38423840