aboutsummaryrefslogtreecommitdiff
path: root/clang/test/CodeGen/memcpy-no-nobuiltin-if-not-emitted.cpp
blob: dc7b32073d5d2d949d062a77de0f6e4e8b31d980 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// RUN: %clang_cc1 -triple i686-linux-gnu -std=c++11 -emit-llvm -o - %s | FileCheck %s
//
// Regression test for the issue reported at
// https://reviews.llvm.org/D78162#1986104

typedef unsigned long size_t;

extern "C" __inline__ __attribute__((__gnu_inline__)) void *memcpy(void *a, const void *b, unsigned c) {
  return __builtin_memcpy(a, b, c);
}
void *memcpy(void *, const void *, unsigned);

// CHECK-LABEL: define{{.*}} void @_Z1av
void a() { (void)memcpy; }

// CHECK-NOT: nobuiltin