Handle passing constant integers to functions much more efficiently. Instead
[oota-llvm.git] / test / Feature / calltest.ll
index 192dca39fee4935be528446825b4adcad3f8a581..1be7ad59719feaaef89d1a20744dfd7a2b781fa0 100644 (file)
@@ -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)