diff options
| author | Siva Chandra <sivachandra@google.com> | 2016-03-10 01:15:17 +0000 |
|---|---|---|
| committer | Siva Chandra <sivachandra@google.com> | 2016-03-10 01:15:17 +0000 |
| commit | aaae5f87af8945cdeac81e86429a303954473a88 (patch) | |
| tree | 57a8fd611259d2bef4eda1516658745023814bc0 /lldb/source/Plugins/SymbolFile | |
| parent | 7776377e62abfa1fae567377d5faae74a2e559ad (diff) | |
| download | bcm5719-llvm-aaae5f87af8945cdeac81e86429a303954473a88.tar.gz bcm5719-llvm-aaae5f87af8945cdeac81e86429a303954473a88.zip | |
[DWARFASTParserClang] Start with member offset of 0 for members of union types.
Summary:
GCC does not emit DW_AT_data_member_location for members of a union.
Starting with a 0 value for member locations helps is reading union types
in such cases.
Reviewers: clayborg
Subscribers: ldrumm, lldb-commits
Differential Revision: http://reviews.llvm.org/D18008
llvm-svn: 263085
Diffstat (limited to 'lldb/source/Plugins/SymbolFile')
| -rw-r--r-- | lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp b/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp index b809233a3de..82934157629 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp +++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp @@ -2673,7 +2673,7 @@ DWARFASTParserClang::ParseChildMembers (const SymbolContext& sc, bool is_artificial = false; DWARFFormValue encoding_form; AccessType accessibility = eAccessNone; - uint32_t member_byte_offset = UINT32_MAX; + uint32_t member_byte_offset = (parent_die.Tag() == DW_TAG_union_type) ? 0 : UINT32_MAX; size_t byte_size = 0; size_t bit_offset = 0; size_t bit_size = 0; |

