[Lldb-commits] [PATCH] D121967: [LLDB][NativePDB] Create inline function decls
Zequan Wu via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Wed Mar 23 11:47:21 PDT 2022
zequanwu added inline comments.
================
Comment at: lldb/source/Plugins/SymbolFile/NativePDB/PdbAstBuilder.cpp:1124
+ // Inlinee is the id index to the function id record that is inlined.
+ PdbTypeSymId func_id(inline_site.Inlinee, true);
+ // Look up the function decl by the id index to see if we have created a
----------------
rnk wrote:
> inline_site is unused from here on in. Really, this function gets or creates a FunctionDecl from an LF_FUNC_ID record. Inline sites happen to point to one of those. Instead of naming this `GetOrCreateInlinedFunctionDecl`, could you name this `GetOrCreateFunctionDeclFromId` and restructure it accordingly? I think that will be more useful in the future if and when we have to make decls from other ids.
>
> I believe S_*PROC32 records do not reference these records, so I don't think there is a way to share the codepaths.
Split out `GetOrCreateFunctionDeclFromId` from `GetOrCreateInlinedFunctionDecl` to get or create function decls from function id.
`GetOrCreateFunctionDeclFromId` needs both the ipi id and symbol id because we need to parse the parameter symbol records after the function symbol record.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D121967/new/
https://reviews.llvm.org/D121967
More information about the lldb-commits
mailing list