forked from OSchip/llvm-project
[lldb/Reproducers] Assert when trying to get object for invalid index.
Assert when trying to get an object for an index we haven't seen before. This will crash anyway, the assertion is just a bit more informative.
This commit is contained in:
parent
e28d8f9069
commit
056f01f895
|
@ -15,6 +15,7 @@ using namespace lldb_private;
|
|||
using namespace lldb_private::repro;
|
||||
|
||||
void *IndexToObject::GetObjectForIndexImpl(unsigned idx) {
|
||||
assert(m_mapping.count(idx) && "No object for index");
|
||||
return m_mapping.lookup(idx);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue