diff options
author | Jonas Devlieghere <jonas@devlieghere.com> | 2019-03-01 22:14:24 +0000 |
---|---|---|
committer | Jonas Devlieghere <jonas@devlieghere.com> | 2019-03-01 22:14:24 +0000 |
commit | 2dc2baa8ccc70e39decb64348bd879e00a5bb0d2 (patch) | |
tree | 5172304163fb28f1be86a2dd7f51a9bb09dc880d /llvm/lib/DebugInfo/DWARF/DWARFDebugLine.cpp | |
parent | 9fe3b4906f351292691cd594b30fe6cf7230b94d (diff) | |
download | bcm5719-llvm-2dc2baa8ccc70e39decb64348bd879e00a5bb0d2.tar.gz bcm5719-llvm-2dc2baa8ccc70e39decb64348bd879e00a5bb0d2.zip |
[DWARFFormValue] Cleanup DWARFFormValue interface. (2/2) (NFC)
Continues the work started in r354941. Changes (all but one) uses of the
extractValue to static createFromData.
llvm-svn: 355233
Diffstat (limited to 'llvm/lib/DebugInfo/DWARF/DWARFDebugLine.cpp')
-rw-r--r-- | llvm/lib/DebugInfo/DWARF/DWARFDebugLine.cpp | 14 |
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; |