Displaying 3 results from an estimated 3 matches for "b2f95d99".
2012 May 29
2
[LLVMdev] How to prevent insertion of memcpy()
Hi,
I have the following program:
// test.c
#include <stdlib.h>
struct foo_t {
int x[1024];
};
__thread struct foo_t g_foo;
void bar(struct foo_t* foo) {
g_foo = *foo;
}
int main() {
struct foo_t* f = (struct foo_t*)malloc(sizeof(struct foo_t));
bar(f);
return 0;
}
When I compile it with clang I see that it inserts memcpy() in function
bar():
$ clang -v
clang version 3.2 (trunk
2012 May 29
0
[LLVMdev] How to prevent insertion of memcpy()
> How do I disable that feature? I've tried -fno-builtin and/or -ffreestanding
> with no success.
clang (as well as gcc) requires that freestanding environment provides
memcpy, memmove, memset and memcmp.
PS: Consider emailing cfedev, not llvmdev.
--
With best regards, Anton Korobeynikov
Faculty of Mathematics and Mechanics, Saint Petersburg State University
2012 May 29
3
[LLVMdev] How to prevent insertion of memcpy()
...Consider emailing cfedev, not llvmdev.
>
Hi,
Thanks. I've emailed cfe-dev.
We absolutely need clang/llvm to not insert the calls into our code.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120529/b2f95d99/attachment.html>