Rafael Espindola | bb46f52 | 2009-01-15 20:18:42 +0000 | [diff] [blame] | 1 | ; Test to make sure that the 'private' is used correctly. |
| 2 | ; |
Dan Gohman | 36a0947 | 2009-09-08 23:54:48 +0000 | [diff] [blame] | 3 | ; RUN: llc < %s -mtriple=x86_64-pc-linux | grep .Lfoo: |
| 4 | ; RUN: llc < %s -mtriple=x86_64-pc-linux | grep call.*\.Lfoo |
| 5 | ; RUN: llc < %s -mtriple=x86_64-pc-linux | grep .Lbaz: |
| 6 | ; RUN: llc < %s -mtriple=x86_64-pc-linux | grep movl.*\.Lbaz |
Rafael Espindola | bb46f52 | 2009-01-15 20:18:42 +0000 | [diff] [blame] | 7 | |
| 8 | declare void @foo() |
| 9 | |
| 10 | define private void @foo() { |
| 11 | ret void |
| 12 | } |
| 13 | |
Dan Gohman | aceba31 | 2010-01-05 17:55:26 +0000 | [diff] [blame] | 14 | @baz = private global i32 4 |
Rafael Espindola | bb46f52 | 2009-01-15 20:18:42 +0000 | [diff] [blame] | 15 | |
| 16 | define i32 @bar() { |
| 17 | call void @foo() |
| 18 | %1 = load i32* @baz, align 4 |
| 19 | ret i32 %1 |
| 20 | } |