diff options
author | Vlad Tsyrklevich <vlad@tsyrklevich.net> | 2019-03-02 01:10:00 +0000 |
---|---|---|
committer | Vlad Tsyrklevich <vlad@tsyrklevich.net> | 2019-03-02 01:10:00 +0000 |
commit | 53a9f1d3676c21b274065bfe1665a0fdcf2bdf24 (patch) | |
tree | cf7ef365d268029e2527a5bac07ad340ba943ec6 /llvm/lib/DebugInfo/DWARF/DWARFAbbreviationDeclaration.cpp | |
parent | 7ec62fde78cd6199738e46c3db044e0d0aac2d89 (diff) | |
download | bcm5719-llvm-53a9f1d3676c21b274065bfe1665a0fdcf2bdf24.tar.gz bcm5719-llvm-53a9f1d3676c21b274065bfe1665a0fdcf2bdf24.zip |
Revert "[DWARFFormValue] Cleanup DWARFFormValue interface. (2/2) (NFC)"
This reverts commit r355233, it was causing UBSan failures.
llvm-svn: 355255
Diffstat (limited to 'llvm/lib/DebugInfo/DWARF/DWARFAbbreviationDeclaration.cpp')
-rw-r--r-- | llvm/lib/DebugInfo/DWARF/DWARFAbbreviationDeclaration.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/llvm/lib/DebugInfo/DWARF/DWARFAbbreviationDeclaration.cpp b/llvm/lib/DebugInfo/DWARF/DWARFAbbreviationDeclaration.cpp index f607dfe37cb..f4dd7993760 100644 --- a/llvm/lib/DebugInfo/DWARF/DWARFAbbreviationDeclaration.cpp +++ b/llvm/lib/DebugInfo/DWARF/DWARFAbbreviationDeclaration.cpp @@ -166,8 +166,10 @@ Optional<DWARFFormValue> DWARFAbbreviationDeclaration::getAttributeValue( if (Spec.isImplicitConst()) return DWARFFormValue::createFromSValue(Spec.Form, Spec.getImplicitConstValue()); - return DWARFFormValue::createFromData(Spec.Form, U.getFormParams(), U, - U.getDebugInfoExtractor(), &Offset); + + DWARFFormValue FormValue(Spec.Form); + if (FormValue.extractValue(DebugInfoData, &Offset, U.getFormParams(), &U)) + return FormValue; } // March Offset along until we get to the attribute we want. if (auto FixedSize = Spec.getByteSize(U)) |