summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTamas Berghammer <tberghammer@google.com>2016-01-13 14:58:48 +0000
committerTamas Berghammer <tberghammer@google.com>2016-01-13 14:58:48 +0000
commit808ff186f6a6ba1fd38cc7e00697cd82f4afe540 (patch)
tree505ac9f81077e1f084917568bea970d6e057b280
parentf60087a22b1c9d44a671d20b58755fe682ade10d (diff)
downloadbcm5719-llvm-808ff186f6a6ba1fd38cc7e00697cd82f4afe540.tar.gz
bcm5719-llvm-808ff186f6a6ba1fd38cc7e00697cd82f4afe540.zip
Silence an incorrect dwarf parsing warning
We have a check what warns if the offset of a class member is greater then or equal to the size of the class. The warning is valid in most case but it is invalid when the last data member is a 0 size array because in this case the member offset can be equal to the class size (subject to alignment limitations). This CL fixis LLDB to not print out a warning in this special case. llvm-svn: 257603
-rw-r--r--lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp2
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 68a0285b69d..74b54d614aa 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
+++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
@@ -2928,7 +2928,7 @@ DWARFASTParserClang::ParseChildMembers (const SymbolContext& sc,
if (member_byte_offset >= parent_byte_size)
{
- if (member_array_size != 1)
+ if (member_array_size != 1 && (member_array_size != 0 || member_byte_offset > parent_byte_size))
{
module_sp->ReportError ("0x%8.8" PRIx64 ": DW_TAG_member '%s' refers to type 0x%8.8" PRIx64 " which extends beyond the bounds of 0x%8.8" PRIx64,
die.GetID(),
OpenPOWER on IntegriCloud