# Sema: perform codegen for anon decl created by \`@extern\` · gitcafe/zig

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

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

Visibility: public

Requested revision: e2cbbd0c264b323a422ef6dc8c586c287aec845a

Requested commit: e2cbbd0c264b323a422ef6dc8c586c287aec845a

Commit: e2cbbd0c264b323a422ef6dc8c586c287aec845a

Tree: e77ffd706104730d8e50d60cfebb60fdf0e7941a

Author: mlugg

Committer: Matthew Lugg

## Message

```
Sema: perform codegen for anon decl created by `@extern`

This fixes a bug where, at least with the LLVM backend, `@extern` calls
which had the same name as a normal `extern` in the same Zcu would
result in the `@extern` incorrectly suffixing the identifier `.2`.
Usually, the LLVM backend has a system to change the generated globals
to "collapse" them all together, but it only works if `updateDecl` is
called!

```

## Parents

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

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