]> git.proxmox.com Git - rustc.git/blame - src/llvm/tools/clang/test/CodeGen/2008-07-29-override-alias-decl.c
Imported Upstream version 0.6
[rustc.git] / src / llvm / tools / clang / test / CodeGen / 2008-07-29-override-alias-decl.c
CommitLineData
223e47cc
LB
1// RUN: %clang_cc1 -triple x86_64-pc-linux-gnu -emit-llvm -o - %s | FileCheck %s
2
3int x() { return 1; }
4
5// CHECK: ret i32 1
6
7
8int f() __attribute__((weak, alias("x")));
9
10/* Test that we link to the alias correctly instead of making a new
11 forward definition. */
12int f();
13int h() {
14 return f();
15}
16
17// CHECK: [[call:%.*]] = call i32 (...)* @f()
18// CHECK: ret i32 [[call]]
19