Skip to content

Commit

Permalink
demangler: Don’t emit an empty string with “with suffix ...” if the f…
Browse files Browse the repository at this point in the history
…ull name could not be demangled

Instead just emit the original name
  • Loading branch information
eeckstein committed Mar 10, 2017
1 parent 7e83ec8 commit e463e69
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/Demangling/Demangler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,9 @@ NodePointer Demangler::demangleSymbol(StringRef MangledName) {
break;
}
}
if (topLevel->getNumChildren() == 0)
return nullptr;

if (EndPos < Text.size()) {
topLevel->addChild(createNode(Node::Kind::Suffix, Text.substr(EndPos)), *this);
}
Expand Down

0 comments on commit e463e69

Please sign in to comment.