summaryrefslogtreecommitdiff
path: root/test/Feature/simplecalltest.ll
blob: 1ac9fe3630389bcde3f55c8b066faf41d62d9ddf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
%FunTy = type int(int)

implementation

void "invoke"(%FunTy *%x)
begin
	%foo = call %FunTy* %x(int 123)
	ret void
end

int "main"(int %argc, sbyte **%argv, sbyte **%envp)
begin
        %retval = call int (int) *%test(int %argc)
        %two    = add int %retval, %retval
	%retval2 = call int %test(int %argc)

	%two2 = add int %two, %retval2
	call void %invoke (%FunTy* %test)
        ret int %two2
end

int "test"(int %i0)
begin
    ret int %i0
end