[Lldb-commits] [PATCH] D82160: [lldb][PDB] Constexpr static member values as AST literals

Jack Andersen via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Fri Jun 19 02:07:08 PDT 2020


jackoalan created this revision.
jackoalan added reviewers: aleksandr.urakov, jasonmolenda, zturner.
jackoalan added a project: LLDB.
Herald added a reviewer: jdoerfert.
Herald added subscribers: llvm-commits, lldb-commits, sstefan1.
Herald added a project: LLVM.

When evaluating an expression referencing a constexpr static member variable, an error is issued because the PDB does not specify a symbol with an address that can be relocated against.

Rather than attempt to resolve the variable's value within the IR execution, the values of all constants can be looked up and incorporated into the AST of the record type as a literal, mirroring the original compiler AST.

This change applies to DIA and native PDB loaders.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D82160

Files:
  lldb/source/Plugins/SymbolFile/NativePDB/PdbAstBuilder.cpp
  lldb/source/Plugins/SymbolFile/NativePDB/UdtRecordCompleter.cpp
  lldb/source/Plugins/SymbolFile/NativePDB/UdtRecordCompleter.h
  lldb/source/Plugins/SymbolFile/PDB/PDBASTParser.cpp
  lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp
  lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.h
  lldb/test/Shell/SymbolFile/PDB/Inputs/AstRestoreTest.cpp
  lldb/test/Shell/SymbolFile/PDB/ast-restore.test
  llvm/include/llvm/DebugInfo/PDB/PDBTypes.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D82160.271934.patch
Type: text/x-patch
Size: 13825 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20200619/542857db/attachment-0001.bin>


More information about the lldb-commits mailing list