[Lldb-commits] [PATCH] D18848: Add PDBASTParser and parse type information from PDB
Greg Clayton via lldb-commits
lldb-commits at lists.llvm.org
Thu Apr 7 12:32:15 PDT 2016
clayborg added a comment.
See inlined comments.
================
Comment at: source/Plugins/SymbolFile/PDB/PDBASTParser.cpp:154-156
@@ +153,5 @@
+
+ CompilerType clang_type =
+ m_ast.CreateRecordType(tu_decl_ctx, access, udt->getName().c_str(), TranslateUdtKind(udt_kind),
+ lldb::eLanguageTypeC_plus_plus, nullptr);
+
----------------
zturner wrote:
> clayborg wrote:
> > If you are creating this type as a forward declaration and you want it to complete itself later, you will need to enable this with:
> >
> > ```
> > m_ast.SetHasExternalStorage (ClangUtil::GetQualType(clang_type)GetOpaqueQualType(), true);
> > ```
> Does this mean I also need to pass `eResolveStateForward` to `Type::Type()`?
Yes
================
Comment at: source/Plugins/SymbolFile/PDB/PDBASTParser.cpp:185
@@ +184,3 @@
+ return std::make_shared<Type>(type.getSymIndexId(), m_ast.GetSymbolFile(), ConstString(name), bytes, nullptr,
+ LLDB_INVALID_UID, Type::eEncodingIsUID, decl, ast_enum, Type::eResolveStateFull);
+ }
----------------
Make sure you complete your enum type, or set the resolve state to eResolveStateForward
http://reviews.llvm.org/D18848
More information about the lldb-commits
mailing list