~louis/ubuntu/trusty/clamav/lp799623_fix_logrotate

« back to all changes in this revision

Viewing changes to libclamav/c++/llvm/test/Analysis/PointerTracking/sizes.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: opt < %s -pointertracking -analyze | FileCheck %s
 
2
target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128"
 
3
target triple = "x86_64-unknown-linux-gnu"
 
4
@.str = internal constant [5 x i8] c"1234\00"           ; <[5 x i8]*> [#uses=1]
 
5
@test1p = global i8* getelementptr ([5 x i8]* @.str, i32 0, i32 0), align 8             ; <i8**> [#uses=1]
 
6
@test1a = global [5 x i8] c"1234\00", align 1           ; <[5 x i8]*> [#uses=1]
 
7
@test2a = global [5 x i32] [i32 1, i32 2, i32 3, i32 4, i32 5], align 4         ; <[5 x i32]*> [#uses=2]
 
8
@test2p = global i32* getelementptr ([5 x i32]* @test2a, i32 0, i32 0), align 8         ; <i32**> [#uses=1]
 
9
@test0p = common global i32* null, align 8              ; <i32**> [#uses=1]
 
10
@test0i = common global i32 0, align 4          ; <i32*> [#uses=1]
 
11
 
 
12
define i32 @foo0() nounwind {
 
13
entry:
 
14
        %tmp = load i32** @test0p               ; <i32*> [#uses=1]
 
15
        %conv = bitcast i32* %tmp to i8*                ; <i8*> [#uses=1]
 
16
        %call = tail call i32 @bar(i8* %conv) nounwind          ; <i32> [#uses=1]
 
17
        %tmp1 = load i8** @test1p               ; <i8*> [#uses=1]
 
18
        %call2 = tail call i32 @bar(i8* %tmp1) nounwind         ; <i32> [#uses=1]
 
19
        %call3 = tail call i32 @bar(i8* getelementptr ([5 x i8]* @test1a, i32 0, i32 0)) nounwind               ; <i32> [#uses=1]
 
20
        %call5 = tail call i32 @bar(i8* bitcast ([5 x i32]* @test2a to i8*)) nounwind           ; <i32> [#uses=1]
 
21
        %tmp7 = load i32** @test2p              ; <i32*> [#uses=1]
 
22
        %conv8 = bitcast i32* %tmp7 to i8*              ; <i8*> [#uses=1]
 
23
        %call9 = tail call i32 @bar(i8* %conv8) nounwind                ; <i32> [#uses=1]
 
24
        %call11 = tail call i32 @bar(i8* bitcast (i32* @test0i to i8*)) nounwind                ; <i32> [#uses=1]
 
25
        %add = add i32 %call2, %call            ; <i32> [#uses=1]
 
26
        %add4 = add i32 %add, %call3            ; <i32> [#uses=1]
 
27
        %add6 = add i32 %add4, %call5           ; <i32> [#uses=1]
 
28
        %add10 = add i32 %add6, %call9          ; <i32> [#uses=1]
 
29
        %add12 = add i32 %add10, %call11                ; <i32> [#uses=1]
 
30
        ret i32 %add12
 
31
}
 
32
 
 
33
declare i32 @bar(i8*)
 
34
 
 
35
define i32 @foo1(i32 %n) nounwind {
 
36
entry:
 
37
; CHECK: 'foo1':
 
38
        %test4a = alloca [10 x i8], align 1             ; <[10 x i8]*> [#uses=1]
 
39
; CHECK: %test4a =
 
40
; CHECK: ==> 1 elements, 10 bytes allocated
 
41
        %test6a = alloca [10 x i32], align 4            ; <[10 x i32]*> [#uses=1]
 
42
; CHECK: %test6a =
 
43
; CHECK: ==> 1 elements, 40 bytes allocated
 
44
        %vla = alloca i8, i32 %n, align 1               ; <i8*> [#uses=1]
 
45
; CHECK: %vla =
 
46
; CHECK: ==> %n elements, %n bytes allocated
 
47
        %0 = shl i32 %n, 2              ; <i32> [#uses=1]
 
48
        %vla7 = alloca i8, i32 %0, align 1              ; <i8*> [#uses=1]
 
49
; CHECK: %vla7 =
 
50
; CHECK: ==> (4 * %n) elements, (4 * %n) bytes allocated
 
51
        %call = call i32 @bar(i8* %vla) nounwind                ; <i32> [#uses=1]
 
52
        %arraydecay = getelementptr [10 x i8]* %test4a, i64 0, i64 0            ; <i8*> [#uses=1]
 
53
        %call10 = call i32 @bar(i8* %arraydecay) nounwind               ; <i32> [#uses=1]
 
54
        %call11 = call i32 @bar(i8* %vla7) nounwind             ; <i32> [#uses=1]
 
55
        %ptrconv14 = bitcast [10 x i32]* %test6a to i8*         ; <i8*> [#uses=1]
 
56
        %call15 = call i32 @bar(i8* %ptrconv14) nounwind                ; <i32> [#uses=1]
 
57
        %add = add i32 %call10, %call           ; <i32> [#uses=1]
 
58
        %add12 = add i32 %add, %call11          ; <i32> [#uses=1]
 
59
        %add16 = add i32 %add12, %call15                ; <i32> [#uses=1]
 
60
        ret i32 %add16
 
61
}
 
62
 
 
63
define i32 @foo2(i64 %n) nounwind {
 
64
entry:
 
65
        %call = tail call i8* @malloc(i64 %n)  ; <i8*> [#uses=1]
 
66
; CHECK: %call =
 
67
; CHECK: ==> %n elements, %n bytes allocated
 
68
        %call2 = tail call i8* @calloc(i64 2, i64 4) nounwind           ; <i8*> [#uses=1]
 
69
; CHECK: %call2 =
 
70
; CHECK: ==> 8 elements, 8 bytes allocated
 
71
        %call4 = tail call i8* @realloc(i8* null, i64 16) nounwind              ; <i8*> [#uses=1]
 
72
; CHECK: %call4 =
 
73
; CHECK: ==> 16 elements, 16 bytes allocated
 
74
        %call6 = tail call i32 @bar(i8* %call) nounwind         ; <i32> [#uses=1]
 
75
        %call8 = tail call i32 @bar(i8* %call2) nounwind                ; <i32> [#uses=1]
 
76
        %call10 = tail call i32 @bar(i8* %call4) nounwind               ; <i32> [#uses=1]
 
77
        %add = add i32 %call8, %call6                   ; <i32> [#uses=1]
 
78
        %add11 = add i32 %add, %call10                ; <i32> [#uses=1]
 
79
        ret i32 %add11
 
80
}
 
81
 
 
82
declare noalias i8* @malloc(i64) nounwind
 
83
 
 
84
declare noalias i8* @calloc(i64, i64) nounwind
 
85
 
 
86
declare noalias i8* @realloc(i8* nocapture, i64) nounwind