Daniel Dunbar | d7d5f02 | 2009-03-24 02:24:46 +0000 | [diff] [blame] | 1 | // RUN: clang-cc -emit-llvm -o - %s | grep -e "^@f" | count 1 |
Daniel Dunbar | 3c827a7 | 2008-08-05 23:31:02 +0000 | [diff] [blame] | 2 | |
Mike Stump | c36541e | 2009-07-21 20:52:43 +0000 | [diff] [blame] | 3 | int x() { return 1; } |
Daniel Dunbar | 3c827a7 | 2008-08-05 23:31:02 +0000 | [diff] [blame] | 4 | |
5 | int f() __attribute__((weak, alias("x"))); | ||||
6 | |||||
7 | /* Test that we link to the alias correctly instead of making a new | ||||
8 | forward definition. */ | ||||
9 | int f(); | ||||
10 | int h() { | ||||
11 | return f(); | ||||
12 | } |