diff options
| author | David Blaikie <dblaikie@gmail.com> | 2018-10-25 21:35:59 +0000 |
|---|---|---|
| committer | David Blaikie <dblaikie@gmail.com> | 2018-10-25 21:35:59 +0000 |
| commit | 2f9c42c99453b9f33d5f4311075c357134e84120 (patch) | |
| tree | 1a333ae96bd17ebb4613060af47ed05b98009c32 /llvm/lib/DebugInfo | |
| parent | ada0f511bab411bec043fa4736c82796629726b9 (diff) | |
| download | bcm5719-llvm-2f9c42c99453b9f33d5f4311075c357134e84120.tar.gz bcm5719-llvm-2f9c42c99453b9f33d5f4311075c357134e84120.zip | |
llvm-dwarfdump: loclists: Don't expect an (albeit empty) expression for LLE_base_address
llvm-svn: 345320
Diffstat (limited to 'llvm/lib/DebugInfo')
| -rw-r--r-- | llvm/lib/DebugInfo/DWARF/DWARFDebugLoc.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/llvm/lib/DebugInfo/DWARF/DWARFDebugLoc.cpp b/llvm/lib/DebugInfo/DWARF/DWARFDebugLoc.cpp index 044a0243360..9146b457a5d 100644 --- a/llvm/lib/DebugInfo/DWARF/DWARFDebugLoc.cpp +++ b/llvm/lib/DebugInfo/DWARF/DWARFDebugLoc.cpp @@ -183,12 +183,14 @@ DWARFDebugLoclists::parseOneLocationList(DataExtractor Data, unsigned *Offset, return None; } - unsigned Bytes = Data.getU16(Offset); - // A single location description describing the location of the object... - StringRef str = Data.getData().substr(*Offset, Bytes); - *Offset += Bytes; - E.Loc.resize(str.size()); - std::copy(str.begin(), str.end(), E.Loc.begin()); + if (Kind != dwarf::DW_LLE_base_address) { + unsigned Bytes = Data.getU16(Offset); + // A single location description describing the location of the object... + StringRef str = Data.getData().substr(*Offset, Bytes); + *Offset += Bytes; + E.Loc.resize(str.size()); + std::copy(str.begin(), str.end(), E.Loc.begin()); + } LL.Entries.push_back(std::move(E)); } |

