[clang] [lldb] [Clang][SPIRV] Add __spirv_event_t builtin type (PR #207077)
Aaron Ballman via cfe-commits
cfe-commits at lists.llvm.org
Fri Jul 17 10:07:27 PDT 2026
AaronBallman wrote:
> > We should validate that it can round trip serialization correctly,
>
> Can you clarify what you mean by this. I test serialization in `AST/spirv-event-type.cpp`, similar to what is done here - #94830
Thanks! I was thinking of modules more than PCH, but CC @ChuanqiXu9 and @Bigcheese as serialization code owners; whatever they think is reasonable is fine by me.
> > test mangling behavior (oops, probably need to update the demangler as well), etc.
>
> Mangling has been tested in `CodeGenCXX/spirv-event-type.cpp`. I am not sure how to write a test for demangling. I could not find tests for opaque builtins I based this patch on. FWIW I tested locally and it works. We don't need to update the demangler since we use u mangling and this is already handled by the demangler.
>
> ```
> $ ./build/bin/llvm-cxxfilt _Z12consumeEventu15__spirv_event_t
> consumeEvent(__spirv_event_t)
>
> $ ./build/bin/llvm-cxxfilt _Z4funcIu15__spirv_event_tEvT_
> void func<__spirv_event_t>(__spirv_event_t)
> ```
Ah, that's good! The demangler is actually an LLVM thing rather than a Clang thing: https://github.com/llvm/llvm-project/tree/main/llvm/tools/llvm-cxxfilt but if this is handled via generic means because we're using an extension mangling, that seems fine.
https://github.com/llvm/llvm-project/pull/207077
More information about the cfe-commits
mailing list