Open zchrissirhcz opened 1 year ago
I also use the VS 2022 provided undname.exe
, which gives expected result:
D:\github\demumble>.\build\Debug\demumble.exe ??$emplace_back@AEBM@?$vector@MV?$allocator@M@std@@@std@@QEAA?A_TAEBM@Z
??$emplace_back@AEBM@?$vector@MV?$allocator@M@std@@@std@@QEAA?A_TAEBM@Z
D:\github\demumble>"C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.36.32532\bin\Hostx64\x64\undname.exe" ??$emplace_back@AEBM@?$vector@MV?$allocator@M@std@@@std@@QEAA?A_TAEBM@Z
Microsoft (R) C++ Name Undecorator
Copyright (C) Microsoft Corporation. All rights reserved.
Undecoration of :- "??$emplace_back@AEBM@?$vector@MV?$allocator@M@std@@@std@@QEAA?A_TAEBM@Z"
is :- "public: decltype(auto) __cdecl std::vector<float,class std::allocator<float> >::emplace_back<float const & __ptr64>(float const & __ptr64) __ptr64"
@llvm/issue-subscribers-clang-codegen
Probably easier to demonstrate the upstream bug using llvm-undname instead of demumble.
The problematic parts seem to be ?A_P
and ?A_T
(specifically, _P
and _T
), which correspond to auto
and decltype(auto)
respectively.
Problem Description
I use latest
llvm/lib/Demangle
files to compile demumble, then usedemumble.exe
to undecorate symbols that generated from C++ files with MSVC. I think demumble just calls LLVM's API, and it failed to demumble the following symbols:Reproduce
LLVM Version:
compile demumble:
Modify
print_demangled()
function indemumble.cc
to the following:Modify
CMakeLists.txt
last 2 lines to (use C++17 instead of C++14):Build project: