summaryrefslogtreecommitdiff
path: root/test/Feature/calltest.ll
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2001-10-13 07:05:07 +0000
committerChris Lattner <sabre@nondot.org>2001-10-13 07:05:07 +0000
commit49ca7aae44325c0d532b7307aa98f51d85674c34 (patch)
tree059f590edc5c1dc1059a8e0129d0ca1e91ce3bfb /test/Feature/calltest.ll
parent5a2f8ba018a4fd150abdeafa4d264eac2bf8049f (diff)
Add more function call and prototype specific tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@777 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Feature/calltest.ll')
-rw-r--r--test/Feature/calltest.ll21
1 files changed, 18 insertions, 3 deletions
diff --git a/test/Feature/calltest.ll b/test/Feature/calltest.ll
index 192dca39fee..1be7ad59719 100644
--- a/test/Feature/calltest.ll
+++ b/test/Feature/calltest.ll
@@ -1,13 +1,28 @@
+%FunTy = type int(int)
+
+declare int "test"(...) ; Test differences of prototype
+declare int "test"() ; Differ only by vararg
+
implementation
-; Bytecode gets a constant pool block, that constains:
-; type plane: int(int)
+void "invoke"(%FunTy *%x)
+begin
+ %foo = call %FunTy* %x(int 123)
+ ret void
+end
int "main"(int %argc) ; TODO: , sbyte **argv, sbyte **envp)
begin
%retval = call int (int) *%test(int %argc)
%two = add int %retval, %retval
- ret int %two
+ %retval2 = invoke int %test(int %argc)
+ to label %Next except label %Error
+Next:
+ %two2 = add int %two, %retval2
+ call void %invoke (%FunTy* %test)
+ ret int %two2
+Error:
+ ret int -1
end
int "test"(int %i0)