$ bin/llvm-undname '?wrapper_type_info_@WorkletGlobalScope@blink@@0ABUWrapperTypeInfo@2@B' ?wrapper_type_info_@WorkletGlobalScope@blink@@0ABUWrapperTypeInfo@2@B private: static struct blink::WrapperTypeInfo const &blink::WorkletGlobalScope::wrapper_type_info_ But regular undname prints: private: static struct blink::WrapperTypeInfo const & const blink::WorkletGlobalScope::wrapper_type_info_ (`const &` vs `const & const`) There are a bunch of similar examples, also with `const *` vs `const * const`, in blink_core.dll.
I’m not sure if this is the same case, but there’s at least one instance of this “bug” where llvm-undname is correct and undname is wrong. See the tests, i even left a comment about it in the test file. If this is the same thing, we should close this one since I believe the bug to be in undname.
I'm willing to believe it's an undname bug :-) The wine implementation of _unDName has it too fwiw. I tried finding the test case you mention but failed. ...aha, but here's a from-source repro that shows you're right: $ cat test.cc struct S {}; struct T { static const S* s_; const S* s(); void set(const S* s); }; const S* T::s() { return s_; } void T::set(const S* s) { s_ = s; } $ third_party/llvm-build/Release+Asserts/bin/clang-cl /c test.cc /Fa -Xclang -emit-llvm 2&>1 > /dev/null ; cat test.asm | grep s_ @"?s_@T@@2PEBUS@@EB" = external dso_local global %struct.S*, align 8 %0 = load %struct.S*, %struct.S** @"?s_@T@@2PEBUS@@EB", align 8 store %struct.S* %0, %struct.S** @"?s_@T@@2PEBUS@@EB", align 8 $ demumble '?s_@T@@2PEBUS@@EB' # currently uses wine _unDName() public: static struct S const * __ptr64 const __ptr64 T::s_ $ bin/llvm-undname '?s_@T@@2PEBUS@@EB' ?s_@T@@2PEBUS@@EB public: static struct S const *T::s_