[demangler] Clean up the expression parser

This commit cleans up the expression parser, using a new style:
  - parse* functions now return Node pointers.
  - The mangled name is now held in Db and accessed with look() and consume()
  - LLVM coding style

This style is meant to avoid the 2 most common types of bugs in the
old demanger, namely misusing the Names stack (ie, calling back() on
empty) and going out of bounds on the mangled name. I also think it
makes the demangler a lot cleaner.

Differential revision: https://reviews.llvm.org/D41887

git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@324111 91177308-0d34-0410-b5e6-96231b3b80d8
2 files changed