Issue 74278
Summary wasm-ld will introduce `memcpy` for const char* copy when `--target=wasm32 -nostdlib`
Labels new issue
Assignees
Reporter HerrCai0907
    ```c
extern int foo(const char *payloadPtr, int payloadSize);

void _start() {
  const char msg[] = "_________________________________________________________________________________________________"
 "____________________";
  foo(msg, sizeof(msg));
}
```
It will be compiled as following which introduce `env::memcpy`
```
  (import "env" "memcpy" (func $memcpy (type 0)))
  (import "env" "foo" (func $foo (type 1)))
```

_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to