[lldb][Module] Document ModuleList::ForEach and assert nullness
authorMichael Buch <michaelbuch12@gmail.com>
Thu, 1 Dec 2022 08:59:03 +0000 (08:59 +0000)
committerMichael Buch <michaelbuch12@gmail.com>
Fri, 2 Dec 2022 10:52:39 +0000 (10:52 +0000)
commit83599000e1f4b30d93b8f4509011b9b68d722835
treeeb7fabe231ad9e4ca29cb4261cb6f5d1aa2a33a3
parenta8a376cbc996711c0d645e27a330c5e577d81757
[lldb][Module] Document ModuleList::ForEach and assert nullness

Currently all callsites already assume the pointer is non-null.
This patch just asserts this assumption.

This is practically enforced by `ModuleList::Append`
which won't add `nullptr`s to `m_modules`.

Differential Revision: https://reviews.llvm.org/D139082
lldb/include/lldb/Core/ModuleList.h
lldb/source/Core/ModuleList.cpp