diff options
| author | Adrian Prantl <aprantl@apple.com> | 2019-11-18 09:58:16 -0800 |
|---|---|---|
| committer | Adrian Prantl <aprantl@apple.com> | 2019-11-18 10:00:26 -0800 |
| commit | d4f18f11d372bd02127424ae6a8f8a30f77a0426 (patch) | |
| tree | f25ad90acd229ac8eccb72cf7170169d2487c450 /lldb/source/Plugins/SymbolFile/PDB | |
| parent | 7e4d386b77f982b260156fc6016ea9c33f466e0b (diff) | |
| download | bcm5719-llvm-d4f18f11d372bd02127424ae6a8f8a30f77a0426.tar.gz bcm5719-llvm-d4f18f11d372bd02127424ae6a8f8a30f77a0426.zip | |
Replace bitfield in lldb::Type with byte-sized members. (NFC)
Due to alginment and packing using separate members takes up the same
amount of space, but makes it far less cumbersome to deal with it in
constructors etc.
Diffstat (limited to 'lldb/source/Plugins/SymbolFile/PDB')
| -rw-r--r-- | lldb/source/Plugins/SymbolFile/PDB/PDBASTParser.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/lldb/source/Plugins/SymbolFile/PDB/PDBASTParser.cpp b/lldb/source/Plugins/SymbolFile/PDB/PDBASTParser.cpp index 47c4ad08849..ccb5b6373ee 100644 --- a/lldb/source/Plugins/SymbolFile/PDB/PDBASTParser.cpp +++ b/lldb/source/Plugins/SymbolFile/PDB/PDBASTParser.cpp @@ -405,7 +405,7 @@ lldb::TypeSP PDBASTParser::CreateLLDBTypeFromPDBType(const PDBSymbol &type) { // This may occur with const or volatile types. There are separate type // symbols in PDB for types with const or volatile modifiers, but we need // to create only one declaration for them all. - Type::ResolveStateTag type_resolve_state_tag; + Type::ResolveState type_resolve_state; CompilerType clang_type = m_ast.GetTypeForIdentifier<clang::CXXRecordDecl>( ConstString(name), decl_context); if (!clang_type.IsValid()) { @@ -442,7 +442,7 @@ lldb::TypeSP PDBASTParser::CreateLLDBTypeFromPDBType(const PDBSymbol &type) { ClangASTContext::SetHasExternalStorage(clang_type.GetOpaqueQualType(), false); - type_resolve_state_tag = Type::eResolveStateFull; + type_resolve_state = Type::ResolveState::Full; } else { // Add the type to the forward declarations. It will help us to avoid // an endless recursion in CompleteTypeFromUdt function. @@ -451,10 +451,10 @@ lldb::TypeSP PDBASTParser::CreateLLDBTypeFromPDBType(const PDBSymbol &type) { ClangASTContext::SetHasExternalStorage(clang_type.GetOpaqueQualType(), true); - type_resolve_state_tag = Type::eResolveStateForward; + type_resolve_state = Type::ResolveState::Forward; } } else - type_resolve_state_tag = Type::eResolveStateForward; + type_resolve_state = Type::ResolveState::Forward; if (udt->isConstType()) clang_type = clang_type.AddConstModifier(); @@ -467,7 +467,7 @@ lldb::TypeSP PDBASTParser::CreateLLDBTypeFromPDBType(const PDBSymbol &type) { type.getSymIndexId(), m_ast.GetSymbolFile(), ConstString(name), udt->getLength(), nullptr, LLDB_INVALID_UID, lldb_private::Type::eEncodingIsUID, decl, clang_type, - type_resolve_state_tag); + type_resolve_state); } break; case PDB_SymType::Enum: { auto enum_type = llvm::dyn_cast<PDBSymbolTypeEnum>(&type); @@ -535,7 +535,7 @@ lldb::TypeSP PDBASTParser::CreateLLDBTypeFromPDBType(const PDBSymbol &type) { return std::make_shared<lldb_private::Type>( type.getSymIndexId(), m_ast.GetSymbolFile(), ConstString(name), bytes, nullptr, LLDB_INVALID_UID, lldb_private::Type::eEncodingIsUID, decl, - ast_enum, lldb_private::Type::eResolveStateFull); + ast_enum, lldb_private::Type::ResolveState::Full); } break; case PDB_SymType::Typedef: { auto type_def = llvm::dyn_cast<PDBSymbolTypeTypedef>(&type); @@ -581,7 +581,7 @@ lldb::TypeSP PDBASTParser::CreateLLDBTypeFromPDBType(const PDBSymbol &type) { type_def->getSymIndexId(), m_ast.GetSymbolFile(), ConstString(name), size, nullptr, target_type->GetID(), lldb_private::Type::eEncodingIsTypedefUID, decl, ast_typedef, - lldb_private::Type::eResolveStateFull); + lldb_private::Type::ResolveState::Full); } break; case PDB_SymType::Function: case PDB_SymType::FunctionSig: { @@ -649,7 +649,7 @@ lldb::TypeSP PDBASTParser::CreateLLDBTypeFromPDBType(const PDBSymbol &type) { type.getSymIndexId(), m_ast.GetSymbolFile(), ConstString(name), llvm::None, nullptr, LLDB_INVALID_UID, lldb_private::Type::eEncodingIsUID, decl, func_sig_ast_type, - lldb_private::Type::eResolveStateFull); + lldb_private::Type::ResolveState::Full); } break; case PDB_SymType::ArrayType: { auto array_type = llvm::dyn_cast<PDBSymbolTypeArray>(&type); @@ -683,7 +683,7 @@ lldb::TypeSP PDBASTParser::CreateLLDBTypeFromPDBType(const PDBSymbol &type) { TypeSP type_sp = std::make_shared<lldb_private::Type>( array_type->getSymIndexId(), m_ast.GetSymbolFile(), ConstString(), bytes, nullptr, LLDB_INVALID_UID, lldb_private::Type::eEncodingIsUID, - decl, array_ast_type, lldb_private::Type::eResolveStateFull); + decl, array_ast_type, lldb_private::Type::ResolveState::Full); type_sp->SetEncodingType(element_type); return type_sp; } break; @@ -712,7 +712,7 @@ lldb::TypeSP PDBASTParser::CreateLLDBTypeFromPDBType(const PDBSymbol &type) { return std::make_shared<lldb_private::Type>( builtin_type->getSymIndexId(), m_ast.GetSymbolFile(), type_name, bytes, nullptr, LLDB_INVALID_UID, lldb_private::Type::eEncodingIsUID, decl, - builtin_ast_type, lldb_private::Type::eResolveStateFull); + builtin_ast_type, lldb_private::Type::ResolveState::Full); } break; case PDB_SymType::PointerType: { auto *pointer_type = llvm::dyn_cast<PDBSymbolTypePointer>(&type); @@ -739,7 +739,7 @@ lldb::TypeSP PDBASTParser::CreateLLDBTypeFromPDBType(const PDBSymbol &type) { pointer_type->getSymIndexId(), m_ast.GetSymbolFile(), ConstString(), pointer_type->getLength(), nullptr, LLDB_INVALID_UID, lldb_private::Type::eEncodingIsUID, decl, pointer_ast_type, - lldb_private::Type::eResolveStateForward); + lldb_private::Type::ResolveState::Forward); } CompilerType pointer_ast_type; @@ -764,7 +764,7 @@ lldb::TypeSP PDBASTParser::CreateLLDBTypeFromPDBType(const PDBSymbol &type) { pointer_type->getSymIndexId(), m_ast.GetSymbolFile(), ConstString(), pointer_type->getLength(), nullptr, LLDB_INVALID_UID, lldb_private::Type::eEncodingIsUID, decl, pointer_ast_type, - lldb_private::Type::eResolveStateFull); + lldb_private::Type::ResolveState::Full); } break; default: break; |

