blob: 30cf938e63b59561911cfd6126896cbf1750ce02 [file] [log] [blame]
Rafael Espindolabb46f522009-01-15 20:18:42 +00001; Test to make sure that the 'private' is used correctly.
2;
Daniel Dunbar67f99982009-08-23 17:26:24 +00003; RUN: llvm-as < %s | llc -mtriple=powerpc-unknown-linux-gnu > %t
4; RUN: grep .Lfoo: %t
5; RUN: grep bl.*\.Lfoo %t
6; RUN: grep .Lbaz: %t
7; RUN: grep lis.*\.Lbaz %t
8; RUN: llvm-as < %s | llc -mtriple=powerpc-apple-darwin > %t
9; RUN: grep L_foo: %t
10; RUN: grep bl.*\L_foo %t
11; RUN: grep L_baz: %t
12; RUN: grep lis.*\L_baz %t
Rafael Espindolabb46f522009-01-15 20:18:42 +000013
Chris Lattner1cda87c2009-07-14 04:50:12 +000014define private void @foo() nounwind {
Rafael Espindolabb46f522009-01-15 20:18:42 +000015 ret void
Daniel Dunbar895ae9b2009-08-23 10:44:51 +000016}
Dan Gohman608ad242009-07-23 00:09:46 +000017
Daniel Dunbar67f99982009-08-23 17:26:24 +000018@baz = private global i32 4;
19
Chris Lattner1cda87c2009-07-14 04:50:12 +000020define i32 @bar() nounwind {
Rafael Espindolabb46f522009-01-15 20:18:42 +000021 call void @foo()
22 %1 = load i32* @baz, align 4
23 ret i32 %1
24}