[Lldb-commits] [PATCH] D133243: [LLDB][NativePDB] Fix PdbAstBuilder::GetParentDeclContextForSymbol when ICF happens.

Zequan Wu via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Fri Sep 2 19:03:38 PDT 2022


zequanwu created this revision.
zequanwu added reviewers: rnk, labath.
Herald added a project: All.
zequanwu requested review of this revision.
Herald added a project: LLDB.
Herald added a subscriber: lldb-commits.

`PdbAstBuilder::GetParentDeclContextForSymbol` finds the public symbol that has
same address as the given symbol, then creates parent DeclContext from demangled
name. When ICF happens, there are multiple public symbols share the same address.
It may creates the wrong parent DeclContext.

This fixes it by filtering all public symbols that has the same addrss with base
name.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D133243

Files:
  lldb/source/Plugins/SymbolFile/NativePDB/PdbAstBuilder.cpp
  lldb/test/Shell/SymbolFile/NativePDB/icf.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D133243.457750.patch
Type: text/x-patch
Size: 7566 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20220903/c1bee999/attachment-0001.bin>


More information about the lldb-commits mailing list