brintos

brintos / llvm-project-archived public Read only

0
0
Text · 883 B · 8a0fffb Raw
37 lines · plain
1// REQUIRES: !system-windows2//3// RUN: rm -rf %t4// RUN: split-file %s %t5// RUN: cd %t6//7// RUN: %clang_cc1 -std=c++20 -O3 %t/a.cppm -emit-module-interface -o %t/a.pcm8// RUN: %clang_cc1 -std=c++20 -O3 %t/test.cc -fmodule-file=a=%t/a.pcm \9// RUN:   -emit-llvm -o - | FileCheck %t/test.cc10 11//--- memmove.h12typedef long unsigned int size_t;13extern "C" void *memmove (void *__dest, const void *__src, size_t __n)14     throw () __attribute__ ((__nonnull__ (1, 2)));15extern "C" __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) void *16 memmove (void *__dest, const void *__src, size_t __len) throw ()17{18  return __builtin_memmove(__dest, __src, __len);19}20 21//--- a.cppm22module;23#include "memmove.h"24export module a;25export using ::memmove;26 27//--- test.cc28import a;29 30void test() {31  int a, b;32  unsigned c = 0;33  memmove(&a, &b, c);34}35 36// CHECK-NOT: memmove37