forked from OSchip/llvm-project
Add a helper function to ProcessStructReader to allow one to inquire about the offset of a field
llvm-svn: 258584
This commit is contained in:
parent
6025933789
commit
6eeb5e70e7
|
@ -94,6 +94,15 @@ namespace lldb_private {
|
|||
return fail_value;
|
||||
return (RetType)(m_data.GetMaxU64(&offset, size));
|
||||
}
|
||||
|
||||
size_t
|
||||
GetOffsetOf(ConstString name, size_t fail_value = SIZE_MAX)
|
||||
{
|
||||
auto iter = m_fields.find(name), end = m_fields.end();
|
||||
if (iter == end)
|
||||
return fail_value;
|
||||
return iter->second.offset;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue