Revert "[llvm] Improve llvm.objectsize computation by computing GEP, alloca and mallo...
[llvm-project.git] / clang / test / CodeGen / strlen-inline-builtin-redecl.c
blobecb062eaaf1890895ec8160d191d57ee5657eb45
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 external definition
5 // CHECK-NOT: strlen.inline
7 unsigned long strnlen(const char *, unsigned long);
8 void fortify_panic(const char *);
10 extern inline __attribute__((always_inline)) __attribute__((gnu_inline)) unsigned long strlen(const char *p) {
11 return 1;
13 unsigned long mystrlen(char const *s) {
14 return strlen(s);
16 unsigned long strlen(const char *s) {
17 return 2;
19 unsigned long yourstrlen(char const *s) {
20 return strlen(s);