blob: 4a36e0f13d5c685a3f2255745a601abccd2df01a [file] [log] [blame]
Daniel Dunbara45cf5b2009-03-24 02:24:46 +00001// RUN: clang-cc -emit-llvm -o - %s | grep -e "^@f" | count 1
Daniel Dunbar829e9882008-08-05 23:31:02 +00002
Mike Stump5e7869f2009-07-21 20:52:43 +00003int x() { return 1; }
Daniel Dunbar829e9882008-08-05 23:31:02 +00004
5int f() __attribute__((weak, alias("x")));
6
7/* Test that we link to the alias correctly instead of making a new
8 forward definition. */
9int f();
10int h() {
11 return f();
12}