diff options
author | Pavel Labath <pavel@labath.sk> | 2019-05-30 09:39:36 +0000 |
---|---|---|
committer | Pavel Labath <pavel@labath.sk> | 2019-05-30 09:39:36 +0000 |
commit | 7e4d62a8dd41f8e87a62887d89e34055dbb1a3e4 (patch) | |
tree | f849fe4c06839595e43a854f1fad2ec6d77e50b7 /llvm/lib/Object/ELFObjectFile.cpp | |
parent | fa147c97d6ba1a59fe885a193a40a274158f38da (diff) | |
download | llvm-7e4d62a8dd41f8e87a62887d89e34055dbb1a3e4.zip llvm-7e4d62a8dd41f8e87a62887d89e34055dbb1a3e4.tar.gz llvm-7e4d62a8dd41f8e87a62887d89e34055dbb1a3e4.tar.bz2 |
DWARFASTParserClang: Move attribute parsing into a single function
Summary:
The ParseTypeFromDWARF function consists of a huge switch on the kind of
type being parsed. Each case in this switch starts with parsing the
attributes of the current DIE. A lot of these attributes are specific to
one kind of a type, but a lot of them are common too, leading to code
duplication.
This patch reduces the duplication (and the size of ParseTypeFromDWARF)
by moving the attribute parsing to a separate function. It creates a
struct (ParsedTypeAttributes), which contains a parsed form of all
attributes which are useful for parsing any kind of a type. The parsing
code for a specific type kind can then access the fields which are
relevant for that specific case.
Reviewers: JDevlieghere, clayborg, aprantl
Subscribers: jdoerfert, lldb-commits
Differential Revision: https://reviews.llvm.org/D62477
llvm-svn: 362075
Diffstat (limited to 'llvm/lib/Object/ELFObjectFile.cpp')
0 files changed, 0 insertions, 0 deletions