[Lldb-commits] [lldb] [LLDB][NativePDB] Use typedef compiler type for typedef types (PR #156250)
Michael Buch via lldb-commits
lldb-commits at lists.llvm.org
Thu Oct 9 01:55:23 PDT 2025
================
@@ -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:
Ah I see, thanks for the context
> The typedefs we currently have are from S_UDT records in the globals stream, so they're represented as "symbols" and GetOrCreateType would not be able to create the type
So what does `GetOrCreateType` achieve in this case? If it's not able to create the `TypedefType`.
https://github.com/llvm/llvm-project/pull/156250
More information about the lldb-commits
mailing list