summaryrefslogtreecommitdiff
path: root/third_party/llvm-project/dwarf2yaml.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/llvm-project/dwarf2yaml.cpp')
-rw-r--r--third_party/llvm-project/dwarf2yaml.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/third_party/llvm-project/dwarf2yaml.cpp b/third_party/llvm-project/dwarf2yaml.cpp
index 994be5511..b43b0e420 100644
--- a/third_party/llvm-project/dwarf2yaml.cpp
+++ b/third_party/llvm-project/dwarf2yaml.cpp
@@ -235,13 +235,18 @@ void dumpDebugInfo(DWARFContext &DCtx, DWARFYAML::Data &Y) {
case dwarf::DW_FORM_data2:
case dwarf::DW_FORM_data4:
case dwarf::DW_FORM_data8:
- case dwarf::DW_FORM_sdata:
case dwarf::DW_FORM_udata:
case dwarf::DW_FORM_ref_sup4:
case dwarf::DW_FORM_ref_sup8:
if (auto Val = FormValue.getValue().getAsUnsignedConstant())
NewValue.Value = Val.getValue();
break;
+ // XXX BINARYEN: sdata is signed, and FormValue won't return it as
+ // unsigned (it returns an empty value).
+ case dwarf::DW_FORM_sdata:
+ if (auto Val = FormValue.getValue().getAsSignedConstant())
+ NewValue.Value = Val.getValue();
+ break;
case dwarf::DW_FORM_string:
if (auto Val = FormValue.getValue().getAsCString())
NewValue.CStr = Val.getValue();