From e79719ce607b6130e41e23dbdc90cc6b4e0401e6 Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Tue, 5 Feb 2019 18:38:58 +0000 Subject: Vendor import of llvm release_80 branch r353167: https://llvm.org/svn/llvm-project/llvm/branches/release_80@353167 --- lib/DebugInfo/DWARF/DWARFDebugLoc.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/DebugInfo/DWARF/DWARFDebugLoc.cpp') diff --git a/lib/DebugInfo/DWARF/DWARFDebugLoc.cpp b/lib/DebugInfo/DWARF/DWARFDebugLoc.cpp index f8b5ff6ec8fb6..94df6946f3ae2 100644 --- a/lib/DebugInfo/DWARF/DWARFDebugLoc.cpp +++ b/lib/DebugInfo/DWARF/DWARFDebugLoc.cpp @@ -184,7 +184,8 @@ DWARFDebugLoclists::parseOneLocationList(DataExtractor Data, unsigned *Offset, } if (Kind != dwarf::DW_LLE_base_address) { - unsigned Bytes = Data.getU16(Offset); + unsigned Bytes = + Version >= 5 ? Data.getULEB128(Offset) : Data.getU16(Offset); // A single location description describing the location of the object... StringRef str = Data.getData().substr(*Offset, Bytes); *Offset += Bytes; -- cgit v1.2.3