Like many of our DWARF classes, the DWARFExpression can be initialized in many ways. One such way was through a constructor that takes just the compile unit. This constructor is used to initialize both empty DWARFExpressions, and DWARFExpression that will be populated later. To make the distinction more clear, I changed the constructor to a default constructor and updated its call sites. Where the DWARFExpression was being populated later, I replaced that with a call to the copy assignment constructor.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp | ||
---|---|---|
508–509 ↗ | (On Diff #201331) | This is not the copy assignment constructor. That would be something like: |
lldb/include/lldb/Expression/DWARFExpression.h | ||
---|---|---|
311–312 ↗ | (On Diff #201331) | correct the comment or remove changes? |
lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp | ||
508–509 ↗ | (On Diff #201331) | Use move?: *frame_base = std::move(DWARFExpression(...)); |
518–519 ↗ | (On Diff #201331) | use move like suggested above? |
lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp | ||
---|---|---|
508–509 ↗ | (On Diff #201331) | move is not needed as DWARFExpression(...) is a temporary. |