File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed
lldb/source/Plugins/Language/CPlusPlus Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -42,7 +42,11 @@ namespace {
4242// }
4343
4444ValueObjectSP GetStorageMember (ValueObject &valobj, llvm::StringRef name) {
45- // Find the union
45+ // DIA PDB flattens the union into the storage
46+ if (valobj.GetNumChildrenIgnoringErrors (3 ) >= 2 )
47+ return valobj.GetChildMemberWithName (name);
48+
49+ // DWARF and NativePDB: Find the union
4650 ValueObjectSP union_sp = valobj.GetChildAtIndex (0 );
4751 if (!union_sp)
4852 return nullptr ;
@@ -119,8 +123,12 @@ bool formatters::MsvcStlVariantSummaryProvider(
119123 storage_type = storage_type.GetTypedefedType ();
120124
121125 CompilerType active_type = storage_type.GetTypeTemplateArgument (1 , true );
122- if (!active_type)
123- return false ;
126+ if (!active_type) {
127+ ValueObjectSP head = GetHead (*storage);
128+ active_type = head->GetCompilerType ();
129+ if (!active_type)
130+ return false ;
131+ }
124132
125133 stream << " Active Type = " << active_type.GetDisplayTypeName () << " " ;
126134 return true ;
You can’t perform that action at this time.
0 commit comments