blob: a36adf58a8c549b61adfbec5d44c24500512c5a6 [file] [log] [blame]
Rafael Espindolabb46f522009-01-15 20:18:42 +00001; Test to make sure that the 'private' is used correctly.
2;
3; 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
Evan Cheng1902a122009-01-25 06:32:01 +00008; RUN: llvm-as < %s | llc -mtriple=powerpc-apple-darwin > %t
Chris Lattner1cda87c2009-07-14 04:50:12 +00009; RUN: grep Lfoo: %t
10; RUN: grep bl.*\Lfoo %t
11; RUN: grep Lbaz: %t
12; RUN: grep lis.*\Lbaz %t
Rafael Espindolabb46f522009-01-15 20:18:42 +000013
Chris Lattner1cda87c2009-07-14 04:50:12 +000014declare void @foo() nounwind
Rafael Espindolabb46f522009-01-15 20:18:42 +000015
Chris Lattner1cda87c2009-07-14 04:50:12 +000016define private void @foo() nounwind {
Rafael Espindolabb46f522009-01-15 20:18:42 +000017 ret void
18}
19
20@baz = private global i32 4;
21
Chris Lattner1cda87c2009-07-14 04:50:12 +000022define i32 @bar() nounwind {
Rafael Espindolabb46f522009-01-15 20:18:42 +000023 call void @foo()
24 %1 = load i32* @baz, align 4
25 ret i32 %1
26}