File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
lldb/source/Plugins/SymbolFile/PDB Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -649,7 +649,9 @@ lldb::TypeSP PDBASTParser::CreateLLDBTypeFromPDBType(const PDBSymbol &type) {
649
649
assert (array_type);
650
650
uint32_t num_elements = array_type->getCount ();
651
651
uint32_t element_uid = array_type->getElementTypeId ();
652
- uint32_t bytes = array_type->getLength ();
652
+ llvm::Optional<uint64_t > bytes;
653
+ if (uint64_t size = array_type->getLength ())
654
+ bytes = size;
653
655
654
656
// If array rank > 0, PDB gives the element type at N=0. So element type
655
657
// will parsed in the order N=0, N=1,..., N=rank sequentially.
@@ -685,7 +687,9 @@ lldb::TypeSP PDBASTParser::CreateLLDBTypeFromPDBType(const PDBSymbol &type) {
685
687
if (builtin_kind == PDB_BuiltinType::None)
686
688
return nullptr ;
687
689
688
- llvm::Optional<uint64_t > bytes = builtin_type->getLength ();
690
+ llvm::Optional<uint64_t > bytes;
691
+ if (uint64_t size = builtin_type->getLength ())
692
+ bytes = size;
689
693
Encoding encoding = TranslateBuiltinEncoding (builtin_kind);
690
694
CompilerType builtin_ast_type = GetBuiltinTypeForPDBEncodingAndBitSize (
691
695
m_ast, *builtin_type, encoding, bytes.getValueOr (0 ) * 8 );
You can’t perform that action at this time.
0 commit comments