hanchenye-llvm-project/lldb/unittests
Pavel Labath 88813103cd PostfixExpression: move parser out of NativePDB internals
Summary:
The postfix expressions in PDB and breakpad symbol files are similar
enough that they can be parsed by the same parser. This patch
generalizes the parser in the NativePDB plugin and moves it into the
PostfixExpression file created in the previous commit (r358976).

The generalization consists of treating any unrecognised token as a
"symbol" node (previously these would only be created for tokens
starting with "$", and other token would abort the parse). This is
needed because breakpad symbols can also contain ".cfa" tokens, which
refer to the frame's CFA.

The cosmetic changes include:
- using a factory function instead of a class for creating nodes (this
  is more generic as it allows the same BumpPtrAllocator to be used for
  other things too)
- using dedicated function for parsing operator tokens instead of a
  DenseMap (more efficient as we don't need to create the DenseMap every
  time).

Reviewers: amccarth, clayborg, JDevlieghere, aleksandr.urakov

Subscribers: jasonmolenda, lldb-commits, markmentovai, mgorny

Differential Revision: https://reviews.llvm.org/D61003

llvm-svn: 359073
2019-04-24 07:27:05 +00:00
..
Breakpoint Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Core [LLDB] - Update the test cases after yaml2obj change. 2019-04-03 15:28:35 +00:00
Disassembler When disassembling Aarch64 target and vendor Apple, set the cpu to 2019-03-07 03:16:45 +00:00
Editline Revert "[EditLineTest] Not always TERM is available, e.g. on some bots." 2019-04-23 16:51:20 +00:00
Expression [ExpressionParser] Add swift-lldb case for finding clang resource dir 2019-03-26 21:00:42 +00:00
Host Clear the output string passed to GetHostName() 2019-04-17 03:13:06 +00:00
Interpreter [CMake] Only the Python scirpt interpreter should link against Python. 2019-04-01 22:03:04 +00:00
Language [NFC] Remove ASCII lines from comments 2019-04-10 20:48:55 +00:00
ObjectFile Breakpad: Match the new UUID algorithm in minidumps 2019-04-16 14:51:47 +00:00
Platform Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Process Minidump: yamlify module-related unit tests 2019-04-21 13:12:40 +00:00
ScriptInterpreter [CMake] Only the Python scirpt interpreter should link against Python. 2019-04-01 22:03:04 +00:00
Signals Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Symbol PostfixExpression: move parser out of NativePDB internals 2019-04-24 07:27:05 +00:00
SymbolFile [NFC] Fix license headers after r352845 2019-02-08 08:48:15 +00:00
Target Refactor user/group name resolving code 2019-03-04 18:48:00 +00:00
TestingSupport Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
UnwindAssembly Use std::make_shared in LLDB (NFC) 2019-02-11 23:13:08 +00:00
Utility [NFC] Remove ASCII lines from comments 2019-04-10 20:48:55 +00:00
debugserver [NFC] Remove ASCII lines from comments 2019-04-10 20:48:55 +00:00
tools [lldb-mi] Check raw pointers before passing them to std::string ctor/assignment 2019-02-25 16:40:11 +00:00
CMakeLists.txt [CMake] Only test debugserver if platform can use debugserver 2019-01-18 00:05:25 +00:00
gtest_common.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00