Reid Spencer | edca80b | 2007-04-15 18:11:57 +0000 | [diff] [blame] | 1 | ; RUN: echo {@X = linkonce global i32 5 \ |
| 2 | ; RUN: define linkonce i32 @foo() \{ ret i32 7 \} } | llvm-as > %t.1.bc |
Dan Gohman | fea1dd0 | 2009-08-25 15:38:29 +0000 | [diff] [blame] | 3 | ; RUN: llvm-as %s -o %t.2.bc |
Reid Spencer | edca80b | 2007-04-15 18:11:57 +0000 | [diff] [blame] | 4 | ; RUN: llvm-link %t.1.bc %t.2.bc |
| 5 | @X = external global i32 |
Chris Lattner | 8869c2c | 2003-04-21 21:06:25 +0000 | [diff] [blame] | 6 | |
Reid Spencer | edca80b | 2007-04-15 18:11:57 +0000 | [diff] [blame] | 7 | declare i32 @foo() |
Chris Lattner | 8869c2c | 2003-04-21 21:06:25 +0000 | [diff] [blame] | 8 | |
Reid Spencer | edca80b | 2007-04-15 18:11:57 +0000 | [diff] [blame] | 9 | define void @bar() { |
| 10 | load i32* @X |
| 11 | call i32 @foo() |
Chris Lattner | 8869c2c | 2003-04-21 21:06:25 +0000 | [diff] [blame] | 12 | ret void |
| 13 | } |
| 14 | |