Commit 056f01f8 authored by Jonas Devlieghere's avatar Jonas Devlieghere
Browse files

[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.
parent e28d8f90
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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);
}