summaryrefslogtreecommitdiffstats
path: root/llvm/lib/DebugInfo/DWARF/DWARFDebugLine.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/DebugInfo/DWARF/DWARFDebugLine.cpp')
-rw-r--r--llvm/lib/DebugInfo/DWARF/DWARFDebugLine.cpp14
1 files changed, 6 insertions, 8 deletions
diff --git a/llvm/lib/DebugInfo/DWARF/DWARFDebugLine.cpp b/llvm/lib/DebugInfo/DWARF/DWARFDebugLine.cpp
index a2c25248618..8dbca510d15 100644
--- a/llvm/lib/DebugInfo/DWARF/DWARFDebugLine.cpp
+++ b/llvm/lib/DebugInfo/DWARF/DWARFDebugLine.cpp
@@ -212,15 +212,14 @@ parseV5DirFileTables(const DWARFDataExtractor &DebugLineData,
if (*OffsetPtr >= EndPrologueOffset)
return false;
for (auto Descriptor : DirDescriptors) {
- DWARFFormValue Value(Descriptor.Form);
switch (Descriptor.Type) {
case DW_LNCT_path:
- if (!Value.extractValue(DebugLineData, OffsetPtr, FormParams, &Ctx, U))
- return false;
- IncludeDirectories.push_back(Value);
+ IncludeDirectories.push_back(DWARFFormValue::createFromData(
+ Descriptor.Form, FormParams, *U, DebugLineData, OffsetPtr, &Ctx));
break;
default:
- if (!Value.skipValue(DebugLineData, OffsetPtr, FormParams))
+ if (!DWARFFormValue::skipValue(Descriptor.Form, DebugLineData,
+ OffsetPtr, FormParams))
return false;
}
}
@@ -240,9 +239,8 @@ parseV5DirFileTables(const DWARFDataExtractor &DebugLineData,
return false;
DWARFDebugLine::FileNameEntry FileEntry;
for (auto Descriptor : FileDescriptors) {
- DWARFFormValue Value(Descriptor.Form);
- if (!Value.extractValue(DebugLineData, OffsetPtr, FormParams, &Ctx, U))
- return false;
+ DWARFFormValue Value = DWARFFormValue::createFromData(
+ Descriptor.Form, FormParams, *U, DebugLineData, OffsetPtr, &Ctx);
switch (Descriptor.Type) {
case DW_LNCT_path:
FileEntry.Name = Value;
OpenPOWER on IntegriCloud