diff options
Diffstat (limited to 'lldb/include/lldb/Symbol/LineTable.h')
-rw-r--r-- | lldb/include/lldb/Symbol/LineTable.h | 27 |
1 files changed, 19 insertions, 8 deletions
diff --git a/lldb/include/lldb/Symbol/LineTable.h b/lldb/include/lldb/Symbol/LineTable.h index 043f3eb895cb..d66b58ca4c6d 100644 --- a/lldb/include/lldb/Symbol/LineTable.h +++ b/lldb/include/lldb/Symbol/LineTable.h @@ -6,8 +6,8 @@ // //===----------------------------------------------------------------------===// -#ifndef liblldb_LineTable_h_ -#define liblldb_LineTable_h_ +#ifndef LLDB_SYMBOL_LINETABLE_H +#define LLDB_SYMBOL_LINETABLE_H #include "lldb/Core/ModuleChild.h" #include "lldb/Core/Section.h" @@ -29,7 +29,8 @@ public: virtual void Clear() = 0; private: - DISALLOW_COPY_AND_ASSIGN(LineSequence); + LineSequence(const LineSequence &) = delete; + const LineSequence &operator=(const LineSequence &) = delete; }; /// \class LineTable LineTable.h "lldb/Symbol/LineTable.h" @@ -42,6 +43,13 @@ public: /// The compile unit to which this line table belongs. LineTable(CompileUnit *comp_unit); + /// Construct with entries found in \a sequences. + /// + /// \param[in] sequences + /// Unsorted list of line sequences. + LineTable(CompileUnit *comp_unit, + std::vector<std::unique_ptr<LineSequence>> &&sequences); + /// Destructor. ~LineTable(); @@ -64,11 +72,11 @@ public: bool is_epilogue_begin, bool is_terminal_entry); // Used to instantiate the LineSequence helper class - LineSequence *CreateLineSequenceContainer(); + static std::unique_ptr<LineSequence> CreateLineSequenceContainer(); // Append an entry to a caller-provided collection that will later be // inserted in this line table. - void AppendLineEntryToSequence(LineSequence *sequence, lldb::addr_t file_addr, + static void AppendLineEntryToSequence(LineSequence *sequence, lldb::addr_t file_addr, uint32_t line, uint16_t column, uint16_t file_idx, bool is_start_of_statement, bool is_start_of_basic_block, @@ -176,7 +184,7 @@ public: /// The number of line table entries in this line table. uint32_t GetSize() const; - typedef lldb_private::RangeArray<lldb::addr_t, lldb::addr_t, 32> + typedef lldb_private::RangeVector<lldb::addr_t, lldb::addr_t, 32> FileAddressRanges; /// Gets all contiguous file address ranges for the entire line table. @@ -259,6 +267,8 @@ protected: public: LessThanBinaryPredicate(LineTable *line_table); bool operator()(const LineTable::Entry &, const LineTable::Entry &) const; + bool operator()(const std::unique_ptr<LineSequence> &, + const std::unique_ptr<LineSequence> &) const; protected: LineTable *m_line_table; @@ -328,9 +338,10 @@ protected: bool ConvertEntryAtIndexToLineEntry(uint32_t idx, LineEntry &line_entry); private: - DISALLOW_COPY_AND_ASSIGN(LineTable); + LineTable(const LineTable &) = delete; + const LineTable &operator=(const LineTable &) = delete; }; } // namespace lldb_private -#endif // liblldb_LineTable_h_ +#endif // LLDB_SYMBOL_LINETABLE_H |