[Lldb-commits] [PATCH] D18848: Add PDBASTParser and parse type information from PDB
Greg Clayton via lldb-commits
lldb-commits at lists.llvm.org
Fri Apr 8 15:24:33 PDT 2016
clayborg added a comment.
In http://reviews.llvm.org/D18848#395933, @zturner wrote:
> I mean for example if someone calls `FindTypes(..., "char", ...);`
> Should a `TypeSP` go into the map?
No you don't have to make one up if you don't have one. At least this is what the DWARF parser does. The main problem is the definition for "char" can be signed or unsigned depending on how your translation unit was compiled. Probably some other char types can vary as well. No expressions will ask for built in types since the expression parser already knows about them. And it is useful to try and lookup "char" in a SymbolFile to see what the notion that that symbol file has for "char" (signed or unsigned).
So if you actually have one, return it. Or if PDB always has some around and it has some unique identifiers for the builtin types you can easily create them from your clang::ASTContext with the "ast->IntTy" and the many other built int types. But if you don't have any, don't worry about creating them from nothing.
More information about the lldb-commits