llvm-project/llvm/lib/Demangle
Zachary Turner 3461bfaa9c [MS Demangler] Rework the way operators are demangled.
Previously, some of the code for actually parsing mangled
operator names was more like formatting code in nature,
and was interspersed with the demangling code which builds
the AST.  This means that by the time we got to the printing
code, we had lost all information about what type of operator
we had, and all we were left with was a string that we just
had to print.  However, not all operators are actually even
operators.  it's basically just a catch-all mangling for
"special names", and for some of the other types it helps
to know when we're actually doing the printing what it is.

This patch changes the way things work by introducing an
OperatorInfo structure and corresponding enumeration.  When
we demangle we store the enumeration value and demangled
components separately.  This gives more flexibility during
printing.

In doing so, some demanglings of special names which we didn't
previously support come out of this for free, so we now demangle
those.

A few are more complex and are better left for a followup patch
though.

An exhaustive test of every possible operator code is included,
with the ones that don't yet work commented out.

llvm-svn: 340046
2018-08-17 16:14:05 +00:00
..
CMakeLists.txt Add a Microsoft Demangler. 2018-07-20 17:27:48 +00:00
Compiler.h [LLVMDemangle] Move some utility classes to header files. 2018-07-16 21:24:03 +00:00
ItaniumDemangle.cpp Factor Node creation out of the demangler. No functionality change 2018-08-16 21:40:57 +00:00
LLVMBuild.txt
MicrosoftDemangle.cpp [MS Demangler] Rework the way operators are demangled. 2018-08-17 16:14:05 +00:00
StringView.h [MS Demangler] Demangle symbols in function scopes. 2018-07-30 03:12:34 +00:00
Utility.h [demangler] call terminate() if allocation failed 2018-07-23 22:23:04 +00:00