Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / CodeGen / strlen-inline-builtin-redecl.c
blobc89f843a71a3e61b58beee09774d73843e8d5108
1 // RUN: %clang_cc1 -triple x86_64 -S -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);