diff options
| author | Jonas Devlieghere <jonas@devlieghere.com> | 2019-05-28 17:34:05 +0000 |
|---|---|---|
| committer | Jonas Devlieghere <jonas@devlieghere.com> | 2019-05-28 17:34:05 +0000 |
| commit | 04a087ace786b81711a1eaf8f7f092bb31d6dd25 (patch) | |
| tree | d521a7670ba74a241d59187570a5e126e8e9f95e /lldb/source/Plugins/SymbolFile/NativePDB | |
| parent | 24e80b8d042a1bcf8a3dd6aeb6275c697f83c659 (diff) | |
| download | bcm5719-llvm-04a087ace786b81711a1eaf8f7f092bb31d6dd25.tar.gz bcm5719-llvm-04a087ace786b81711a1eaf8f7f092bb31d6dd25.zip | |
[DWARFExpression] Remove ctor that takes just a compile unit.
Like many of our DWARF classes, the DWARFExpression can be initialized
in several 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.
Differential revision: https://reviews.llvm.org/D62425
llvm-svn: 361849
Diffstat (limited to 'lldb/source/Plugins/SymbolFile/NativePDB')
| -rw-r--r-- | lldb/source/Plugins/SymbolFile/NativePDB/DWARFLocationExpression.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lldb/source/Plugins/SymbolFile/NativePDB/DWARFLocationExpression.cpp b/lldb/source/Plugins/SymbolFile/NativePDB/DWARFLocationExpression.cpp index 5db7de6f7c7..3d8bfb05872 100644 --- a/lldb/source/Plugins/SymbolFile/NativePDB/DWARFLocationExpression.cpp +++ b/lldb/source/Plugins/SymbolFile/NativePDB/DWARFLocationExpression.cpp @@ -111,13 +111,13 @@ static DWARFExpression MakeLocationExpressionInternal(lldb::ModuleSP module, uint32_t address_size = architecture.GetAddressByteSize(); uint32_t byte_size = architecture.GetDataByteSize(); if (byte_order == eByteOrderInvalid || address_size == 0) - return DWARFExpression(nullptr); + return DWARFExpression(); RegisterKind register_kind = eRegisterKindDWARF; StreamBuffer<32> stream(Stream::eBinary, address_size, byte_order); if (!writer(stream, register_kind)) - return DWARFExpression(nullptr); + return DWARFExpression(); DataBufferSP buffer = std::make_shared<DataBufferHeap>(stream.GetData(), stream.GetSize()); |

