Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions lldb/source/Plugins/Language/CPlusPlus/MsvcStlVariant.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,16 @@ bool formatters::MsvcStlVariantSummaryProvider(
storage_type = storage_type.GetTypedefedType();

CompilerType active_type = storage_type.GetTypeTemplateArgument(1, true);
if (!active_type)
return false;
if (!active_type) {
// PDB: get the type from the head as we don't have template arguments
// there.
ValueObjectSP head = GetHead(*storage);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need a nullcheck on head here?

if (!head)
return false;
active_type = head->GetCompilerType();
if (!active_type)
return false;
}

stream << " Active Type = " << active_type.GetDisplayTypeName() << " ";
return true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@


class StdVariantDataFormatterTestCase(TestBase):
TEST_WITH_PDB_DEBUG_INFO = True

def do_test(self):
"""Test that that file and class static variables display correctly."""

Expand Down
Loading