Use toplevel function pass manager as OnTheFly manager.
[oota-llvm.git] / test / ExecutionEngine / 2002-12-16-ArgTest.ll
index 077e45abab19151a82330b7505626bb8239ce81c..4ef1439d713285989df5cc3e574c8ee0312f1709 100644 (file)
@@ -1,8 +1,9 @@
-%.LC0 = internal global [14 x sbyte] c"in getoptions\00"               ; <[14 x sbyte]*> [#uses=1]
+; RUN: llvm-upgrade %s | llvm-as -f -o %t.bc
+; RUN: lli %t.bc > /dev/null
 
-implementation   ; Functions:
+%.LC0 = internal global [10 x sbyte] c"argc: %d\0A\00"
 
-declare void %__main()
+implementation   ; Functions:
 
 declare int %puts(sbyte*)
 
@@ -11,12 +12,14 @@ bb0:                ; No predecessors!
        ret void
 }
 
+declare int %printf(sbyte*, ...)
+
 int %main(int %argc, sbyte** %argv) {
 bb0:           ; No predecessors!
+       call int (sbyte*, ...)* %printf( sbyte* getelementptr ([10 x sbyte]* %.LC0, long 0, long 0), int %argc)
        %cast224 = cast sbyte** %argv to sbyte*         ; <sbyte*> [#uses=1]
        %local = alloca sbyte*          ; <sbyte**> [#uses=3]
        store sbyte* %cast224, sbyte** %local
-       call void %__main( )
        %cond226 = setle int %argc, 0           ; <bool> [#uses=1]
        br bool %cond226, label %bb3, label %bb2