llvm-project/llvm/lib/Demangle
Nico Weber 5f6eb1817a llvm-undname: Fix another crash-on-invalid
This fixes a regression from https://reviews.llvm.org/D60354. We used to

  SymbolNode *Symbol = demangleEncodedSymbol(MangledName, QN);
  if (Symbol) {
    Symbol->Name = QN;
  }

but changed that to
  SymbolNode *Symbol = demangleEncodedSymbol(MangledName, QN);
  if (Error)
    return nullptr;
  Symbol->Name = QN;

and one branch somewhere returned a nullptr without setting Error.

Looking at the code changed in r340083 and r340710 that branch looks
like a remnant from an earlier attempt to demangle RTTI descriptors
that has since been rewritten -- so just remove this branch. It
shouldn't change behavior for correctly mangled symbols.

llvm-svn: 358112
2019-04-10 17:31:34 +00:00
..
CMakeLists.txt Move demangling function from llvm-objdump to Demangle library 2019-01-17 15:18:44 +00:00
Demangle.cpp Add missing include (cstdlib) to Demangle.h 2019-01-22 19:18:18 +00:00
ItaniumDemangle.cpp Update more file headers across all of the LLVM projects in the monorepo 2019-01-19 10:56:40 +00:00
LLVMBuild.txt Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MicrosoftDemangle.cpp llvm-undname: Fix another crash-on-invalid 2019-04-10 17:31:34 +00:00
MicrosoftDemangleNodes.cpp Update more file headers across all of the LLVM projects in the monorepo 2019-01-19 10:56:40 +00:00