On Thu, 2024-08-15 at 15:09 -0700, Andrii Nakryiko wrote: [...] > > > Or we can use macro like > > > > > > #ifdef __TARGET_ARCH_x86 > > > __jit(...) > > > ... > > > #elif defined(__TARGET_ARCH_arm64) > > > __jit(...) > > > ... > > > #elif defined(...) > > > > > > Or we can have > > > > > > __arch_x86_64 > > > __jit(...) // code for x86 > > > ... > > > > > > __arch_arm64 > > > __jit(...) // code for arm64 > > > ... > > > > > > __arch_riscv > > > __jit(...) // code for riscv > > > ... > > > > This also looks good, and will work better with "*_next" and "*_not" > > variants if we are going to borrow from llvm-lit/FileCheck. > > > > shorter __jit() and then arch-specific __arch_blah seems pretty clean, > so if it's not too hard, let's do this. Ok, let's go this way. > BTW, in your implementation you are collecting expected messages for > all specified architectures, but really there will always be just one > valid subset. So maybe just discard all non-host architectures upfront > during "parsing" of decl tags? I kinda wanted to keep parsing logic separate from processing logic, but yeah, makes sense. [...]