diff options
author | Victor Leschuk <vleschuk@accesssoftek.com> | 2017-01-10 21:18:26 +0000 |
---|---|---|
committer | Victor Leschuk <vleschuk@accesssoftek.com> | 2017-01-10 21:18:26 +0000 |
commit | cbddae74f501f6a2ad13c86672dda3af834bc250 (patch) | |
tree | 4ba910e62c901515f8f2853959d71f590c5c9c10 /llvm/lib/DebugInfo/DWARF/DWARFFormValue.cpp | |
parent | af6a9b982c2076e364cc657a34ae7ab6e5a3435c (diff) | |
download | bcm5719-llvm-cbddae74f501f6a2ad13c86672dda3af834bc250.tar.gz bcm5719-llvm-cbddae74f501f6a2ad13c86672dda3af834bc250.zip |
DebugInfo: support for DW_FORM_implicit_const
Support for DW_FORM_implicit_const DWARFv5 feature.
When this form is used attribute value goes to .debug_abbrev section (as SLEB).
As this form would break any debug tool which doesn't support DWARFv5
it is guarded by dwarf version check. Attempt to use this form with
dwarf version <= 4 is considered a fatal error.
Differential Revision: https://reviews.llvm.org/D28456
llvm-svn: 291599
Diffstat (limited to 'llvm/lib/DebugInfo/DWARF/DWARFFormValue.cpp')
-rw-r--r-- | llvm/lib/DebugInfo/DWARF/DWARFFormValue.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/DebugInfo/DWARF/DWARFFormValue.cpp b/llvm/lib/DebugInfo/DWARF/DWARFFormValue.cpp index e48a6f0981b..dc9310dc4e8 100644 --- a/llvm/lib/DebugInfo/DWARF/DWARFFormValue.cpp +++ b/llvm/lib/DebugInfo/DWARF/DWARFFormValue.cpp @@ -153,7 +153,7 @@ static Optional<uint8_t> getFixedByteSize(dwarf::Form Form, const T *U) { return 16; case DW_FORM_implicit_const: - // The implicit value is stored in the abbreviation as a ULEB128, any + // The implicit value is stored in the abbreviation as a SLEB128, and // there no data in debug info. return 0; @@ -280,6 +280,8 @@ bool DWARFFormValue::isFormClass(DWARFFormValue::FormClass FC) const { case DW_FORM_GNU_str_index: case DW_FORM_GNU_strp_alt: return (FC == FC_String); + case DW_FORM_implicit_const: + return (FC == FC_Constant); default: break; } |