~louis/ubuntu/trusty/clamav/lp799623_fix_logrotate

« back to all changes in this revision

Viewing changes to libclamav/c++/llvm/test/Integer/recursivetype_bt.ll

  • Committer: Bazaar Package Importer
  • Author(s): Scott Kitterman
  • Date: 2010-03-12 11:30:04 UTC
  • mfrom: (0.41.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20100312113004-b0fop4bkycszdd0z
Tags: 0.96~rc1+dfsg-0ubuntu1
* New upstream RC - FFE (LP: #537636):
  - Add OfficialDatabaseOnly option to clamav-base.postinst.in
  - Add LocalSocketGroup option to clamav-base.postinst.in
  - Add LocalSocketMode option to clamav-base.postinst.in
  - Add CrossFilesystems option to clamav-base.postinst.in
  - Add ClamukoScannerCount option to clamav-base.postinst.in
  - Add BytecodeSecurity opiton to clamav-base.postinst.in
  - Add DetectionStatsHostID option to clamav-freshclam.postinst.in
  - Add Bytecode option to clamav-freshclam.postinst.in
  - Add MilterSocketGroup option to clamav-milter.postinst.in
  - Add MilterSocketMode option to clamav-milter.postinst.in
  - Add ReportHostname option to clamav-milter.postinst.in
  - Bump libclamav SO version to 6.1.0 in libclamav6.install
  - Drop clamdmon from clamav.examples (no longer shipped by upstream)
  - Drop libclamav.a from libclamav-dev.install (not built by upstream)
  - Update SO version for lintian override for libclamav6
  - Add new Bytecode Testing Tool, usr/bin/clambc, to clamav.install
  - Add build-depends on python and python-setuptools for new test suite
  - Update debian/copyright for the embedded copy of llvm (using the system
    llvm is not currently feasible)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
; RUN: llvm-as %s -o - | llvm-dis > %t1.ll
 
2
; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll
 
3
; RUN: diff %t1.ll %t2.ll
 
4
 
 
5
 
 
6
; This file contains the output from the following compiled C code:
 
7
; typedef struct list {
 
8
;   struct list *Next;
 
9
;   i32 Data;
 
10
; } list;
 
11
;
 
12
; // Iterative insert fn
 
13
; void InsertIntoListTail(list **L, i32 Data) {
 
14
;   while (*L)
 
15
;     L = &(*L)->Next;
 
16
;   *L = (list*)malloc(sizeof(list));
 
17
;   (*L)->Data = Data;
 
18
;   (*L)->Next = 0;
 
19
; }
 
20
;
 
21
; // Recursive list search fn
 
22
; list *FindData(list *L, i32 Data) {
 
23
;   if (L == 0) return 0;
 
24
;   if (L->Data == Data) return L;
 
25
;   return FindData(L->Next, Data);
 
26
; }
 
27
;
 
28
; void DoListStuff() {
 
29
;   list *MyList = 0;
 
30
;   InsertIntoListTail(&MyList, 100);
 
31
;   InsertIntoListTail(&MyList, 12);
 
32
;   InsertIntoListTail(&MyList, 42);
 
33
;   InsertIntoListTail(&MyList, 1123);
 
34
;   InsertIntoListTail(&MyList, 1213);
 
35
;
 
36
;   if (FindData(MyList, 75)) foundIt();
 
37
;   if (FindData(MyList, 42)) foundIt();
 
38
;   if (FindData(MyList, 700)) foundIt();
 
39
; }
 
40
 
 
41
%list = type { %list*, i36 }
 
42
 
 
43
declare i8 *@"malloc"(i32)
 
44
 
 
45
;;**********************
 
46
;;**********************
 
47
 
 
48
define void @"InsertIntoListTail"(%list** %L, i36 %Data)
 
49
begin
 
50
bb1:
 
51
        %reg116 = load %list** %L                               ;;<%list*>
 
52
        %cast1004 = inttoptr i64 0 to %list*                      ;;<%list*>
 
53
        %cond1000 = icmp eq %list* %reg116, %cast1004             ;;<i1>
 
54
        br i1 %cond1000, label %bb3, label %bb2
 
55
 
 
56
bb2:
 
57
        %reg117 = phi %list** [ %reg118, %bb2 ], [ %L, %bb1 ]   ;;<%list**>
 
58
        %cast1010 = bitcast %list** %reg117 to %list***            ;;<%list***>
 
59
        %reg118 = load %list*** %cast1010                       ;;<%list**>
 
60
        %reg109 = load %list** %reg118                          ;;<%list*>
 
61
        %cast1005 = inttoptr i64 0 to %list*                      ;;<%list*>
 
62
        %cond1001 = icmp ne %list* %reg109, %cast1005             ;;<i1>
 
63
        br i1 %cond1001, label %bb2, label %bb3
 
64
 
 
65
bb3:
 
66
        %reg119 = phi %list** [ %reg118, %bb2 ], [ %L, %bb1 ]   ;;<%list**>
 
67
        %cast1006 = bitcast %list** %reg119 to i8**             ;;<i8**>
 
68
        %reg111 = call i8* @malloc(i32 16)                  ;;<i8*>
 
69
        store i8* %reg111, i8** %cast1006                 ;;<void>
 
70
        %reg112 = ptrtoint i8* %reg111 to i64
 
71
        %reg1002 = add i64 %reg112, 8
 
72
        %reg1005 = inttoptr i64 %reg1002 to i8*             ;;<i8*>
 
73
        %cast1008 = bitcast i8* %reg1005 to i36*                ;;<i36*>
 
74
        store i36 %Data, i36* %cast1008                         ;;<void>
 
75
        %cast1003 = inttoptr i64 0 to i64*                      ;;<i64*>
 
76
        %cast1009 = bitcast i8* %reg111 to i64**              ;;<i64**>
 
77
        store i64* %cast1003, i64** %cast1009               ;;<void>
 
78
        ret void
 
79
end
 
80
 
 
81
define %list* @"FindData"(%list* %L, i36 %Data)
 
82
begin
 
83
bb1:
 
84
        br label %bb2
 
85
 
 
86
bb2:
 
87
        %reg115 = phi %list* [ %reg116, %bb6 ], [ %L, %bb1 ]    ;;<%list*>
 
88
        %cast1014 = inttoptr i64 0 to %list*                      ;;<%list*>
 
89
        %cond1011 = icmp ne %list* %reg115, %cast1014             ;;<i1>
 
90
        br i1 %cond1011, label %bb4, label %bb3
 
91
 
 
92
bb3:
 
93
        ret %list* null
 
94
 
 
95
bb4:
 
96
        %idx = getelementptr %list* %reg115, i64 0, i32 1                  ;;<i36>
 
97
        %reg111 = load i36* %idx
 
98
        %cond1013 = icmp ne i36 %reg111, %Data                    ;;<i1>
 
99
        br i1 %cond1013, label %bb6, label %bb5
 
100
 
 
101
bb5:
 
102
        ret %list* %reg115
 
103
 
 
104
bb6:
 
105
        %idx2 = getelementptr %list* %reg115, i64 0, i32 0                  ;;<%list*>
 
106
        %reg116 = load %list** %idx2
 
107
        br label %bb2
 
108
end