xref: /llvm-project/clang/test/CodeGen/user-func-gnu-inline-redecl.c (revision c5de4dd1eab00df76c1a68c5f397304ceacb71f2)
1 // RUN: %clang_cc1 -triple x86_64 -emit-llvm -O1 -o - %s | FileCheck %s
2 //
3 // Verifies that the gnu_inline version is ignored in favor of the redecl
4 
some_size(int c)5 extern inline __attribute__((gnu_inline)) unsigned long some_size(int c) {
6   return 1;
7 }
mycall(int s)8 unsigned long mycall(int s) {
9   // CHECK-LABEL: i64 @mycall
10   // CHECK: ret i64 2
11   return some_size(s);
12 }
some_size(int c)13 unsigned long some_size(int c) {
14   return 2;
15 }
yourcall(int s)16 unsigned long yourcall(int s) {
17   // CHECK-LABEL: i64 @yourcall
18   // CHECK: ret i64 2
19   return some_size(s);
20 }
21