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



_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to