aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/DebugInfo/DWARFFormValue.cpp
diff options
context:
space:
mode:
authorEric Christopher <echristo@gmail.com>2012-11-16 23:44:11 +0000
committerEric Christopher <echristo@gmail.com>2012-11-16 23:44:11 +0000
commit59c53c2e081bfe3e6f61dd1998af1454026bf972 (patch)
tree205668a728ff339bb53e9e9e03a20d50bf353ee8 /llvm/lib/DebugInfo/DWARFFormValue.cpp
parent1ccfff111d28cd25e52b31375efa2b64327be713 (diff)
downloadllvm-59c53c2e081bfe3e6f61dd1998af1454026bf972.zip
llvm-59c53c2e081bfe3e6f61dd1998af1454026bf972.tar.gz
llvm-59c53c2e081bfe3e6f61dd1998af1454026bf972.tar.bz2
Add some basic support for the fission addr forms to DebugInfo.
llvm-svn: 168223
Diffstat (limited to 'llvm/lib/DebugInfo/DWARFFormValue.cpp')
-rw-r--r--llvm/lib/DebugInfo/DWARFFormValue.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/llvm/lib/DebugInfo/DWARFFormValue.cpp b/llvm/lib/DebugInfo/DWARFFormValue.cpp
index 07f7b44..1d8ea01 100644
--- a/llvm/lib/DebugInfo/DWARFFormValue.cpp
+++ b/llvm/lib/DebugInfo/DWARFFormValue.cpp
@@ -46,6 +46,8 @@ static const uint8_t form_sizes_addr4[] = {
0, // 0x18 DW_FORM_exprloc
0, // 0x19 DW_FORM_flag_present
8, // 0x20 DW_FORM_ref_sig8
+ 4, // 0x1f01 DW_FORM_GNU_addr_index
+ 4, // 0x1f02 DW_FORM_GNU_str_index
};
static const uint8_t form_sizes_addr8[] = {
@@ -76,6 +78,8 @@ static const uint8_t form_sizes_addr8[] = {
0, // 0x18 DW_FORM_exprloc
0, // 0x19 DW_FORM_flag_present
8, // 0x20 DW_FORM_ref_sig8
+ 8, // 0x1f01 DW_FORM_GNU_addr_index
+ 8, // 0x1f01 DW_FORM_GNU_str_index
};
const uint8_t *
@@ -185,6 +189,12 @@ DWARFFormValue::extractValue(DataExtractor data, uint32_t *offset_ptr,
case DW_FORM_ref_sig8:
Value.uval = data.getU64(offset_ptr);
break;
+ case DW_FORM_GNU_addr_index:
+ Value.uval = data.getULEB128(offset_ptr);
+ break;
+ case DW_FORM_GNU_str_index:
+ Value.uval = data.getULEB128(offset_ptr);
+ break;
default:
return false;
}