================
@@ -2045,14 +2045,17 @@ TypeSP 
SymbolFileNativePDB::CreateTypedef(PdbGlobalSymId id) {
   if (!ts)
     return nullptr;
 
-  ts->GetNativePDBParser()->GetOrCreateTypedefDecl(id);
+  auto *typedef_decl = ts->GetNativePDBParser()->GetOrCreateTypedefDecl(id);
+
+  CompilerType ct = target_type->GetForwardCompilerType();
+  if (auto *clang = llvm::dyn_cast_or_null<TypeSystemClang>(ts.get()))
+    ct = clang->GetType(clang->getASTContext().getTypeDeclType(typedef_decl));
----------------
Michael137 wrote:

What use does `GetOrCreateType` have here? If that's not the thing that creates 
the correct `TypedefType`? Or in other words, could you elaborate on how this 
fixes the issue?

Is it that `GetOrCreateTypedefDecl` creates a new decl, but the associated 
`TypedefType` is different from the type created by `GetOrCreateType`? Does 
that mean we create two different typedefs? 

https://github.com/llvm/llvm-project/pull/156250
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to