HomePhabricator

[lldb][PDB] Constexpr static member values as AST literals

Authored by aleksandr.urakov on Jun 25 2020, 1:22 AM.

Description

[lldb][PDB] Constexpr static member values as AST literals

Summary:
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.

Patch By: jackoalan

Reviewers: aleksandr.urakov, jasonmolenda, zturner, jdoerfert, teemperor

Reviewed By: aleksandr.urakov

Subscribers: sstefan1, lldb-commits, llvm-commits, #lldb

Tags: #lldb, #llvm

Differential Revision: https://reviews.llvm.org/D82160

Details

Committed
aleksandr.urakovJun 25 2020, 1:27 AM
Reviewer
aleksandr.urakov
Differential Revision
D82160: [lldb][PDB] Constexpr static member values as AST literals
Parents
rG2c061998b557: [MLIR][Shape] Add `shape.rank` operation
Branches
Unknown
Tags
Unknown