2009-01-16 04:18:42 +08:00
|
|
|
; Test to make sure that the 'private' is used correctly.
|
|
|
|
;
|
2014-02-07 07:35:22 +08:00
|
|
|
; RUN: llc < %s -mtriple=powerpc-unknown-linux-gnu | \
|
|
|
|
; RUN: FileCheck --check-prefix=LINUX %s
|
|
|
|
;
|
|
|
|
; RUN: llc < %s -mtriple=powerpc-apple-darwin | \
|
|
|
|
; RUN: FileCheck --check-prefix=OSX %s
|
2009-01-16 04:18:42 +08:00
|
|
|
|
2014-02-07 07:35:22 +08:00
|
|
|
; LINUX: .Lfoo:
|
2014-02-20 01:23:20 +08:00
|
|
|
; OSX: l_foo:
|
2009-07-14 12:50:12 +08:00
|
|
|
define private void @foo() nounwind {
|
2009-01-16 04:18:42 +08:00
|
|
|
ret void
|
2009-08-23 18:44:51 +08:00
|
|
|
}
|
2009-07-23 08:09:46 +08:00
|
|
|
|
2009-07-14 12:50:12 +08:00
|
|
|
define i32 @bar() nounwind {
|
2014-02-07 07:35:22 +08:00
|
|
|
; LINUX: bl{{.*}}.Lfoo
|
2014-02-20 01:23:20 +08:00
|
|
|
; OSX: bl{{.*}}l_foo
|
2009-01-16 04:18:42 +08:00
|
|
|
call void @foo()
|
2014-02-07 07:35:22 +08:00
|
|
|
|
|
|
|
; LINUX: lis{{.*}}.Lbaz
|
2014-02-20 01:23:20 +08:00
|
|
|
; OSX: lis{{.*}}l_baz
|
2015-02-28 05:17:42 +08:00
|
|
|
%1 = load i32, i32* @baz, align 4
|
2009-01-16 04:18:42 +08:00
|
|
|
ret i32 %1
|
|
|
|
}
|
2014-02-07 07:35:22 +08:00
|
|
|
|
|
|
|
; LINUX: .Lbaz:
|
2014-02-20 01:23:20 +08:00
|
|
|
; OSX: l_baz:
|
2014-02-07 07:35:22 +08:00
|
|
|
@baz = private global i32 4
|