blob: f9405f6af2ffe46c2dc25c3a2b40491fdd426747 [file] [log] [blame]
Rafael Espindolabb46f522009-01-15 20:18:42 +00001; Test to make sure that the 'private' is used correctly.
2;
Dan Gohmanfce288f2009-09-09 00:09:15 +00003; RUN: llc < %s -mtriple=powerpc-unknown-linux-gnu > %t
Daniel Dunbar67f99982009-08-23 17:26:24 +00004; RUN: grep .Lfoo: %t
5; RUN: grep bl.*\.Lfoo %t
6; RUN: grep .Lbaz: %t
7; RUN: grep lis.*\.Lbaz %t
Dan Gohmanfce288f2009-09-09 00:09:15 +00008; RUN: llc < %s -mtriple=powerpc-apple-darwin > %t
Daniel Dunbar67f99982009-08-23 17:26:24 +00009; 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
Dan Gohmanaceba312010-01-05 17:55:26 +000018@baz = private global i32 4
Daniel Dunbar67f99982009-08-23 17:26:24 +000019
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}