2009-03-24 10:24:46 +08:00
|
|
|
// RUN: clang-cc -arch i386 -emit-llvm -o %t %s &&
|
2009-02-17 05:52:05 +08:00
|
|
|
// RUN: grep '@llvm.memset.i32' %t &&
|
|
|
|
// RUN: grep '@llvm.memcpy.i32' %t &&
|
|
|
|
// RUN: grep '@llvm.memmove.i32' %t &&
|
|
|
|
// RUN: grep __builtin %t | count 0
|
2008-07-22 08:26:45 +08:00
|
|
|
|
|
|
|
int main(int argc, char **argv) {
|
|
|
|
unsigned char a = 0x11223344;
|
|
|
|
unsigned char b = 0x11223344;
|
|
|
|
__builtin_bzero(&a, sizeof(a));
|
|
|
|
__builtin_memset(&a, 0, sizeof(a));
|
|
|
|
__builtin_memcpy(&a, &b, sizeof(a));
|
|
|
|
__builtin_memmove(&a, &b, sizeof(a));
|
|
|
|
return 0;
|
|
|
|
}
|