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
StorageClass SC = demangleVariableStorageClass(MangledName);
return demangleVariableEncoding(MangledName, SC);
}
- case '8':
- return nullptr;
}
FunctionSymbolNode *FSN = demangleFunctionEncoding(MangledName);
; CHECK-EMPTY:
; CHECK-NEXT: ??__E?Foo@@0HA@@
; CHECK-NEXT: error: Invalid mangled name
+
+??8@8
+; CHECK-EMPTY:
+; CHECK-NEXT: ??8@8
+; CHECK-NEXT: error: Invalid mangled name