# llvm: mangle extern Wasm functions · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/66bcc55e0196bd43746a09a79668c7c495bd1f89)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: 66bcc55e0196bd43746a09a79668c7c495bd1f89

Requested commit: 66bcc55e0196bd43746a09a79668c7c495bd1f89

Commit: 66bcc55e0196bd43746a09a79668c7c495bd1f89

Tree: ce5e5918602e157634415093009183ba370a44ec

Author: Luuk de Gram

Committer: Luuk de Gram

## Message

```
llvm: mangle extern Wasm functions

When Wasm extern functions contain the same name, but have a
different module name such as `extern "a"` vs `extern "b"` LLVM will
currently resolve the two functions to the same symbol. By mangling
the name of the symbol, we ensure the functions are resolved
seperately. We mangle the name by applying <name>|<module> where
module is also known as the library name.

```

## Parents

- [bd32206b4449e329c9ef6ba4fd19746234f474f8](https://git.cafe/gitcafe/zig/commit/bd32206b4449e329c9ef6ba4fd19746234f474f8?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/66bcc55e0196bd43746a09a79668c7c495bd1f89?format=markdown)
