From 8aaa52329ade20107fe28af7085b0a1f395816a8 Mon Sep 17 00:00:00 2001 From: Todd Fiala Date: Tue, 5 Nov 2013 11:17:04 -0800 Subject: Fixes for LLDB build to work around host 4.6.2+ compiler issues. These fixes to the LLDB source add manual copy constructor and operator=() methods for classes that use member bitfields and are used in templated containers. The intent is to keep this change (and related LLVM and clang changes) local to android only until we either fix the compiler or use a new one for host executable builds. --- include/lldb/DataFormatters/FormatCache.h | 3 +++ source/DataFormatters/FormatCache.cpp | 19 ++++++++++++++++ source/Plugins/SymbolFile/DWARF/DWARFDebugLine.h | 29 ++++++++++++++++++++++++ 3 files changed, 51 insertions(+) diff --git a/include/lldb/DataFormatters/FormatCache.h b/include/lldb/DataFormatters/FormatCache.h index 941b96c1f..884200b1b 100644 --- a/include/lldb/DataFormatters/FormatCache.h +++ b/include/lldb/DataFormatters/FormatCache.h @@ -34,10 +34,13 @@ private: lldb::SyntheticChildrenSP m_synthetic_sp; public: Entry (); + Entry (const Entry& rhs); Entry (lldb::TypeSummaryImplSP); Entry (lldb::SyntheticChildrenSP); Entry (lldb::TypeSummaryImplSP,lldb::SyntheticChildrenSP); + Entry& operator= (const Entry& rhs); + bool IsSummaryCached (); diff --git a/source/DataFormatters/FormatCache.cpp b/source/DataFormatters/FormatCache.cpp index af7b1c386..89d6ad49e 100644 --- a/source/DataFormatters/FormatCache.cpp +++ b/source/DataFormatters/FormatCache.cpp @@ -28,6 +28,13 @@ m_summary_sp(), m_synthetic_sp() {} +FormatCache::Entry::Entry (const Entry& rhs) : +m_summary_cached(rhs.m_summary_cached), +m_synthetic_cached(rhs.m_synthetic_cached), +m_summary_sp(rhs.m_summary_sp), +m_synthetic_sp(rhs.m_synthetic_sp) +{} + FormatCache::Entry::Entry (lldb::TypeSummaryImplSP summary_sp) : m_synthetic_cached(false), m_synthetic_sp() @@ -48,6 +55,18 @@ FormatCache::Entry::Entry (lldb::TypeSummaryImplSP summary_sp,lldb::SyntheticChi SetSynthetic (synthetic_sp); } +FormatCache::Entry& FormatCache::Entry::operator= (const Entry& rhs) +{ + if (this == &rhs) + return *this; + + m_summary_cached = rhs.m_summary_cached; + m_synthetic_cached = rhs.m_synthetic_cached; + m_summary_sp = rhs.m_summary_sp; + m_synthetic_sp = rhs.m_synthetic_sp; + return *this; +} + bool FormatCache::Entry::IsSummaryCached () { diff --git a/source/Plugins/SymbolFile/DWARF/DWARFDebugLine.h b/source/Plugins/SymbolFile/DWARF/DWARFDebugLine.h index cfa8654ed..3cc7dc657 100644 --- a/source/Plugins/SymbolFile/DWARF/DWARFDebugLine.h +++ b/source/Plugins/SymbolFile/DWARF/DWARFDebugLine.h @@ -110,6 +110,35 @@ public: typedef collection::const_iterator const_iterator; Row(bool default_is_stmt = false); + Row(const Row& rhs) : + address(rhs.address), + line(rhs.line), + column(rhs.column), + file(rhs.file), + is_stmt(rhs.is_stmt), + basic_block(rhs.basic_block), + end_sequence(rhs.end_sequence), + prologue_end(rhs.prologue_end), + epilogue_begin(rhs.epilogue_begin), + isa(rhs.isa) + {} + Row& operator =(const Row& rhs) + { + if (&rhs == this) + return *this; + + address = rhs.address; + line = rhs.line; + column = rhs.column; + file = rhs.file; + is_stmt = rhs.is_stmt; + basic_block = rhs.basic_block; + end_sequence = rhs.end_sequence; + prologue_end = rhs.prologue_end; + epilogue_begin = rhs.epilogue_begin; + isa = rhs.isa; + return *this; + } virtual ~Row() {} void PostAppend (); void Reset(bool default_is_stmt); -- cgit v1.2.3