llvm.org GIT mirror llvm / 71f6d6e
[DebugInfo] Remove dead code. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192952 91177308-0d34-0410-b5e6-96231b3b80d8 Alexey Samsonov 6 years ago
2 changed file(s) with 3 addition(s) and 43 deletion(s). Raw diff Collapse all Expand all
3232 bool IsDWOIndex;
3333 };
3434
35 enum {
36 eValueTypeInvalid = 0,
37 eValueTypeUnsigned,
38 eValueTypeSigned,
39 eValueTypeCStr,
40 eValueTypeBlock
41 };
42
4335 private:
4436 uint16_t Form; // Form for this value.
4537 ValueType Value; // Contains all data for the form.
5446 bool isInlinedCStr() const {
5547 return Value.data != NULL && Value.data == (const uint8_t*)Value.cstr;
5648 }
57 const uint8_t *BlockData() const;
49
5850 uint64_t getReference(const DWARFUnit *U) const;
59
6051 uint64_t getUnsigned() const { return Value.uval; }
6152 int64_t getSigned() const { return Value.sval; }
6253 const char *getAsCString(const DWARFUnit *U) const;
6354 uint64_t getAsAddress(const DWARFUnit *U) const;
55
6456 bool skipValue(DataExtractor debug_info_data, uint32_t *offset_ptr,
6557 const DWARFUnit *u) const;
6658 static bool skipValue(uint16_t form, DataExtractor debug_info_data,
6759 uint32_t *offset_ptr, const DWARFUnit *u);
68 static bool isBlockForm(uint16_t form);
69 static bool isDataForm(uint16_t form);
60
7061 static const uint8_t *getFixedFormSizes(uint8_t AddrSize, uint16_t Version);
7162 };
7263
478478
479479 return die_offset;
480480 }
481
482 const uint8_t *DWARFFormValue::BlockData() const {
483 if (!isInlinedCStr())
484 return Value.data;
485 return NULL;
486 }
487
488 bool DWARFFormValue::isBlockForm(uint16_t form) {
489 switch (form) {
490 case DW_FORM_exprloc:
491 case DW_FORM_block:
492 case DW_FORM_block1:
493 case DW_FORM_block2:
494 case DW_FORM_block4:
495 return true;
496 }
497 return false;
498 }
499
500 bool DWARFFormValue::isDataForm(uint16_t form) {
501 switch (form) {
502 case DW_FORM_sdata:
503 case DW_FORM_udata:
504 case DW_FORM_data1:
505 case DW_FORM_data2:
506 case DW_FORM_data4:
507 case DW_FORM_data8:
508 return true;
509 }
510 return false;
511 }