Daniel Dunbar | 0d7b091 | 2009-02-03 21:54:49 +0000 | [diff] [blame] | 1 | // RUN: clang -triple i386-unknown-unknown -emit-llvm -o %t %s && |
Daniel Dunbar | 219df66 | 2008-09-08 23:44:31 +0000 | [diff] [blame] | 2 | // RUN: grep -e "@f = alias" %t | count 1 && |
| 3 | // RUN: grep -e "bitcast (i32 (i32)\\* @f to i32 (float)\\*)" %t | count 1 |
| 4 | // <rdar://problem/6140807> |
| 5 | |
| 6 | int f(float) __attribute__((weak, alias("x"))); |
| 7 | |
| 8 | // Make sure we replace uses properly... |
| 9 | int y() { |
| 10 | return f(1.); |
| 11 | } |
| 12 | |
Chris Lattner | 777f07b | 2008-12-17 07:32:46 +0000 | [diff] [blame] | 13 | int x(int a) { |
Daniel Dunbar | 219df66 | 2008-09-08 23:44:31 +0000 | [diff] [blame] | 14 | } |