File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
lldb/source/Plugins/SymbolFile/DWARF Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change 9
9
#ifndef LLDB_SOURCE_PLUGINS_SYMBOLFILE_DWARF_DWARFDECLCONTEXT_H
10
10
#define LLDB_SOURCE_PLUGINS_SYMBOLFILE_DWARF_DWARFDECLCONTEXT_H
11
11
12
- #include < string>
13
- #include < vector>
14
12
#include " lldb/Utility/ConstString.h"
15
13
#include " DWARFDefines.h"
16
14
15
+ #include < cassert>
16
+ #include < string>
17
+ #include < vector>
18
+
17
19
// DWARFDeclContext
18
20
//
19
21
// A class that represents a declaration context all the way down to a
@@ -53,12 +55,12 @@ class DWARFDeclContext {
53
55
uint32_t GetSize () const { return m_entries.size (); }
54
56
55
57
Entry &operator [](uint32_t idx) {
56
- // " idx" must be valid
58
+ assert ( idx < m_entries. size () && " invalid index " );
57
59
return m_entries[idx];
58
60
}
59
61
60
62
const Entry &operator [](uint32_t idx) const {
61
- // " idx" must be valid
63
+ assert ( idx < m_entries. size () && " invalid index " );
62
64
return m_entries[idx];
63
65
}
64
66
You can’t perform that action at this time.
0 commit comments