~ubuntu-branches/ubuntu/quantal/llvm-3.1/quantal

« back to all changes in this revision

Viewing changes to test/Feature/globalvars.ll

  • Committer: Package Import Robot
  • Author(s): Sylvestre Ledru
  • Date: 2012-03-29 19:09:51 UTC
  • Revision ID: package-import@ubuntu.com-20120329190951-aq83ivog4cg8bxun
Tags: upstream-3.1~svn153643
ImportĀ upstreamĀ versionĀ 3.1~svn153643

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
; RUN: llvm-as < %s | llvm-dis > %t1.ll
 
2
; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll
 
3
; RUN: diff %t1.ll %t2.ll
 
4
 
 
5
@MyVar = external global i32            ; <i32*> [#uses=1]
 
6
@MyIntList = external global { i32*, i32 }               ; <{ \2*, i32 }*> [#uses=1]
 
7
external global i32             ; <i32*>:0 [#uses=0]
 
8
@AConst = constant i32 123              ; <i32*> [#uses=0]
 
9
@AString = constant [4 x i8] c"test"            ; <[4 x i8]*> [#uses=0]
 
10
@ZeroInit = global { [100 x i32], [40 x float] } zeroinitializer                ; <{ [100 x i32], [40 x float] }*> [#uses=0]
 
11
 
 
12
define i32 @foo(i32 %blah) {
 
13
        store i32 5, i32* @MyVar
 
14
        %idx = getelementptr { i32*, i32 }* @MyIntList, i64 0, i32 1             ; <i32*> [#uses=1]
 
15
        store i32 12, i32* %idx
 
16
        ret i32 %blah
 
17
}
 
18