Revert "[llvm] Improve llvm.objectsize computation by computing GEP, alloca and mallo...
[llvm-project.git] / clang / test / CodeGen / fread-inline-builtin-late-redecl.c
blobce964a7a6f6fde30e6afa2303c1ccdb32ffe01f1
1 // RUN: %clang_cc1 -triple x86_64 -emit-llvm -disable-llvm-passes -o - %s | FileCheck %s
2 //
3 // Verifies that clang-generated *.inline are removed when shadowed by an
4 // external definition, even when that definition appears at the end of the
5 // file.
7 // CHECK-NOT: strlen.inline
9 extern unsigned long strlen(char const *s);
11 extern __inline __attribute__((__always_inline__)) __attribute__((__gnu_inline__)) unsigned long strlen(char const *s) {
12 return 1;
15 static unsigned long chesterfield(char const *s) {
16 return strlen(s);
18 static unsigned long (*_strlen)(char const *ptr);
20 unsigned long blutch(char const *s) {
21 return chesterfield(s);
24 unsigned long strlen(char const *s) {
25 return _strlen(s);