On Mon, Mar 11, 2019 at 10:39:37AM -0700, Andrii Nakryiko wrote: > > There is a GCC extension that allows to forward-declare enums: > https://gcc.gnu.org/onlinedocs/gcc/Incomplete-Enums.html#Incomplete-Enums > > Kernel actually has examples of using this (see patch description > regrading irqchip_irq_state). we've considered several different ways of either extending or changing BTF api to accommodate this unforeseen C langauge extension. All of them require patches for the kernel 5.1 and 5.0 and/or llvm, so we've decided to proceed with the existing kernel code and llvm and only tweak btf dedup logic the way this patch does. I've applied this set to bpf tree.