mirror of
https://github.com/intel/llvm.git
synced 2026-01-18 07:57:36 +08:00
[lldb/Symbol] Fix null-deref in TypeList::Dump
This patch should just a crash caused by a null pointer dereferencing when dumping a type. It makes sure that the pointer is valid. rdar://97455134 Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
This commit is contained in:
@@ -92,9 +92,9 @@ void TypeList::ForEach(
|
||||
}
|
||||
|
||||
void TypeList::Dump(Stream *s, bool show_context) {
|
||||
for (iterator pos = m_types.begin(), end = m_types.end(); pos != end; ++pos) {
|
||||
pos->get()->Dump(s, show_context);
|
||||
}
|
||||
for (iterator pos = m_types.begin(), end = m_types.end(); pos != end; ++pos)
|
||||
if (Type *t = pos->get())
|
||||
t->Dump(s, show_context);
|
||||
}
|
||||
|
||||
void TypeList::RemoveMismatchedTypes(llvm::StringRef qualified_typename,
|
||||
|
||||
Reference in New Issue
Block a user