llvm.org GIT mirror llvm / 8d433bd
[DebugInfo] Remove unneeded struct member and hide struct definition. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192954 91177308-0d34-0410-b5e6-96231b3b80d8 Alexey Samsonov 6 years ago
2 changed file(s) with 3 addition(s) and 7 deletion(s). Raw diff Collapse all Expand all
1717 class raw_ostream;
1818
1919 class DWARFFormValue {
20 public:
2120 struct ValueType {
22 ValueType() : data(NULL), IsDWOIndex(false) {
21 ValueType() : data(NULL) {
2322 uval = 0;
2423 }
2524
2928 const char* cstr;
3029 };
3130 const uint8_t* data;
32 bool IsDWOIndex;
3331 };
3432
35 private:
3633 uint16_t Form; // Form for this value.
3734 ValueType Value; // Contains all data for the form.
3835
183183 case DW_FORM_GNU_addr_index:
184184 case DW_FORM_GNU_str_index:
185185 Value.uval = data.getULEB128(offset_ptr);
186 Value.IsDWOIndex = true;
187186 break;
188187 default:
189188 return false;
440439 if (!CU)
441440 return NULL;
442441 uint32_t Offset = Value.uval;
443 if (Value.IsDWOIndex) {
442 if (Form == DW_FORM_GNU_str_index) {
444443 uint32_t StrOffset;
445444 if (!CU->getStringOffsetSectionItem(Offset, StrOffset))
446445 return NULL;
452451 uint64_t DWARFFormValue::getAsAddress(const DWARFUnit *CU) const {
453452 if (!CU)
454453 return 0;
455 if (Value.IsDWOIndex) {
454 if (Form == DW_FORM_GNU_addr_index) {
456455 uint32_t Index = Value.uval;
457456 uint64_t Address;
458457 if (!CU->getAddrOffsetSectionItem(Index, Address))