xref: /llvm-project/clang/test/CodeGen/memcpy-no-nobuiltin-if-not-emitted.cpp (revision c5de4dd1eab00df76c1a68c5f397304ceacb71f2)
1 // RUN: %clang_cc1 -triple i686-linux-gnu -std=c++11 -emit-llvm -o - %s | FileCheck %s
2 //
3 // Regression test for the issue reported at
4 // https://reviews.llvm.org/D78162#1986104
5 
6 typedef unsigned long size_t;
7 
memcpy(void * a,const void * b,unsigned c)8 extern "C" __inline__ __attribute__((__gnu_inline__)) void *memcpy(void *a, const void *b, unsigned c) {
9   return __builtin_memcpy(a, b, c);
10 }
11 void *memcpy(void *, const void *, unsigned);
12 
13 // CHECK-LABEL: define{{.*}} void @_Z1av
a()14 void a() { (void)memcpy; }
15 
16 // CHECK-NOT: nobuiltin
17