0
Fork 0
mirror of https://codeberg.org/ziglang/zig synced 2026-11-18 07:05:05 +00:00
zig/lib
Evan Haas dc4fa83dd7
translate-c: add framework for special-casing macros
Some macros (for example any macro that uses token pasting) cannot be
directly translated to Zig, but may nevertheless still admit a Zig
implementation. This provides a mechanism for matching macros against
templates and mapping them to functions implemented in c_translation.zig.

A macro matches a template if it contains the same sequence of tokens, except
that the name and parameters may be renamed. No attempt is made to
semantically analyze the macro. For example the following two macros are
considered equivalent:

```C
```

But the following two are not:

```C
```
History 2021-07-22 08:09:46 -07:00
..
include llvm12: sync with llvmorg-12.0.0-rc2 2021-02-26 13:44:33 -08:00
libc wasi-libc: remove crt1.o as it's not WASI ABI compatible 2021-07-11 00:06:47 +02:00
libcxx llvm12: sync with llvmorg-12.0.0-rc2 2021-02-26 13:44:33 -08:00
libcxxabi llvm12: sync with llvmorg-12.0.0-rc2 2021-02-26 13:44:33 -08:00
libunwind llvm12: sync with llvmorg-12.0.0-rc2 2021-02-26 13:44:33 -08:00
std translate-c: add framework for special-casing macros 2021-07-22 08:09:46 -07:00
tsan stage2: fix Cache deadlock and build more of TSAN 2020-12-24 01:18:48 -07:00