brintos

brintos / llvm-project-archived public Read only

0
0
Text · 387 B · 6db0cc3 Raw
20 lines · c
1// RUN: %clang_cc1 -triple x86_64-pc-linux-gnu -emit-llvm -o - %s | FileCheck %s2 3int x(void) { return 1; }4 5// CHECK:  ret i32 16 7 8int f(void) __attribute__((weak, alias("x")));9 10/* Test that we link to the alias correctly instead of making a new11   forward definition. */12int f(void);13int h(void) {14  return f();15}16 17// CHECK:  [[call:%.*]] = call i32 @f()18// CHECK:  ret i32 [[call]]19 20