summaryrefslogtreecommitdiffstats
path: root/llvm/lib/ObjectYAML
diff options
context:
space:
mode:
authorChris Bieneman <beanz@apple.com>2017-03-06 23:22:49 +0000
committerChris Bieneman <beanz@apple.com>2017-03-06 23:22:49 +0000
commitbcf513f25a40c0323dfea75d5ba3110a415ff9e3 (patch)
treeb5a833913a680be90ba80be4c1eaa48cfcb00e8f /llvm/lib/ObjectYAML
parent89bf0e725f6fc80845d434fcf0d7772bbb5d4978 (diff)
downloadbcm5719-llvm-bcf513f25a40c0323dfea75d5ba3110a415ff9e3.tar.gz
bcm5719-llvm-bcf513f25a40c0323dfea75d5ba3110a415ff9e3.zip
[ObjectYAML] Support for DW_FORM_implicit_const DWARF5 form
This patch adds support to the DWARF YAML reader and writer for the new DWARF5 abbreviation form, DW_FORM_implicit_const. The attribute was added in r291599. llvm-svn: 297091
Diffstat (limited to 'llvm/lib/ObjectYAML')
-rw-r--r--llvm/lib/ObjectYAML/DWARFEmitter.cpp2
-rw-r--r--llvm/lib/ObjectYAML/DWARFYAML.cpp2
2 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/ObjectYAML/DWARFEmitter.cpp b/llvm/lib/ObjectYAML/DWARFEmitter.cpp
index d3c244e808b..c1116a1be46 100644
--- a/llvm/lib/ObjectYAML/DWARFEmitter.cpp
+++ b/llvm/lib/ObjectYAML/DWARFEmitter.cpp
@@ -74,6 +74,8 @@ void DWARFYAML::EmitDebugAbbrev(raw_ostream &OS, const DWARFYAML::Data &DI) {
for (auto Attr : AbbrevDecl.Attributes) {
encodeULEB128(Attr.Attribute, OS);
encodeULEB128(Attr.Form, OS);
+ if (Attr.Form == dwarf::DW_FORM_implicit_const)
+ encodeSLEB128(Attr.Value, OS);
}
encodeULEB128(0, OS);
encodeULEB128(0, OS);
diff --git a/llvm/lib/ObjectYAML/DWARFYAML.cpp b/llvm/lib/ObjectYAML/DWARFYAML.cpp
index f55d59aff04..2a8cdd5fd4a 100644
--- a/llvm/lib/ObjectYAML/DWARFYAML.cpp
+++ b/llvm/lib/ObjectYAML/DWARFYAML.cpp
@@ -54,6 +54,8 @@ void MappingTraits<DWARFYAML::AttributeAbbrev>::mapping(
IO &IO, DWARFYAML::AttributeAbbrev &AttAbbrev) {
IO.mapRequired("Attribute", AttAbbrev.Attribute);
IO.mapRequired("Form", AttAbbrev.Form);
+ if(AttAbbrev.Form == dwarf::DW_FORM_implicit_const)
+ IO.mapRequired("Value", AttAbbrev.Value);
}
void MappingTraits<DWARFYAML::ARangeDescriptor>::mapping(
OpenPOWER on IntegriCloud