Dan Gohman | f17a25c | 2007-07-18 16:29:46 +0000 | [diff] [blame] | 1 | ; The funcresolve pass will (intentionally) llvm-link an _internal_ function |
| 2 | ; body with an external declaration. Because of this, if we LINK an internal |
| 3 | ; function body into a program that already has an external declaration for |
| 4 | ; the function name, we must rename the internal function to something that |
| 5 | ; does not conflict. |
| 6 | |
| 7 | ; RUN: echo { define internal i32 @foo() \{ ret i32 7 \} } | llvm-as > %t.1.bc |
| 8 | ; RUN: llvm-as < %s > %t.2.bc |
Dan Gohman | 0682a46 | 2009-09-15 15:38:31 +0000 | [diff] [blame] | 9 | ; RUN: llvm-link %t.1.bc %t.2.bc -S | grep internal | not grep @foo( |
Dan Gohman | f17a25c | 2007-07-18 16:29:46 +0000 | [diff] [blame] | 10 | |
| 11 | declare i32 @foo() |
| 12 | |
| 13 | define i32 @test() { |
| 14 | %X = call i32 @foo() |
| 15 | ret i32 %X |
| 16 | } |
| 17 | |