[llvm] r192954 - [DebugInfo] Remove unneeded struct member and hide struct definition. No functionality change.
Alexey Samsonov
samsonov at google.com
Fri Oct 18 00:13:32 PDT 2013
Author: samsonov
Date: Fri Oct 18 02:13:32 2013
New Revision: 192954
URL: http://llvm.org/viewvc/llvm-project?rev=192954&view=rev
Log:
[DebugInfo] Remove unneeded struct member and hide struct definition. No functionality change.
Modified:
llvm/trunk/include/llvm/DebugInfo/DWARFFormValue.h
llvm/trunk/lib/DebugInfo/DWARFFormValue.cpp
Modified: llvm/trunk/include/llvm/DebugInfo/DWARFFormValue.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/DWARFFormValue.h?rev=192954&r1=192953&r2=192954&view=diff
==============================================================================
--- llvm/trunk/include/llvm/DebugInfo/DWARFFormValue.h (original)
+++ llvm/trunk/include/llvm/DebugInfo/DWARFFormValue.h Fri Oct 18 02:13:32 2013
@@ -18,9 +18,8 @@ class DWARFUnit;
class raw_ostream;
class DWARFFormValue {
-public:
struct ValueType {
- ValueType() : data(NULL), IsDWOIndex(false) {
+ ValueType() : data(NULL) {
uval = 0;
}
@@ -30,10 +29,8 @@ public:
const char* cstr;
};
const uint8_t* data;
- bool IsDWOIndex;
};
-private:
uint16_t Form; // Form for this value.
ValueType Value; // Contains all data for the form.
Modified: llvm/trunk/lib/DebugInfo/DWARFFormValue.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/DWARFFormValue.cpp?rev=192954&r1=192953&r2=192954&view=diff
==============================================================================
--- llvm/trunk/lib/DebugInfo/DWARFFormValue.cpp (original)
+++ llvm/trunk/lib/DebugInfo/DWARFFormValue.cpp Fri Oct 18 02:13:32 2013
@@ -184,7 +184,6 @@ bool DWARFFormValue::extractValue(DataEx
case DW_FORM_GNU_addr_index:
case DW_FORM_GNU_str_index:
Value.uval = data.getULEB128(offset_ptr);
- Value.IsDWOIndex = true;
break;
default:
return false;
@@ -441,7 +440,7 @@ const char *DWARFFormValue::getAsCString
if (!CU)
return NULL;
uint32_t Offset = Value.uval;
- if (Value.IsDWOIndex) {
+ if (Form == DW_FORM_GNU_str_index) {
uint32_t StrOffset;
if (!CU->getStringOffsetSectionItem(Offset, StrOffset))
return NULL;
@@ -453,7 +452,7 @@ const char *DWARFFormValue::getAsCString
uint64_t DWARFFormValue::getAsAddress(const DWARFUnit *CU) const {
if (!CU)
return 0;
- if (Value.IsDWOIndex) {
+ if (Form == DW_FORM_GNU_addr_index) {
uint32_t Index = Value.uval;
uint64_t Address;
if (!CU->getAddrOffsetSectionItem(Index, Address))
More information about the llvm-commits
mailing list