AsmPrinter: Remove DIEHash::AttrEntry, NFC

Remove "the most boring struct ever" (thanks to review by Eric).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238366 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Duncan P. N. Exon Smith
2015-05-27 22:36:37 +00:00
parent 611a2f2322
commit 95afdd3a07
2 changed files with 53 additions and 62 deletions

View File

@@ -122,7 +122,7 @@ void DIEHash::collectAttributes(const DIE &Die, DIEAttrs &Attrs) {
#define COLLECT_ATTR(NAME) \
case dwarf::NAME: \
Attrs.NAME.Val = Values[i]; \
Attrs.NAME = Values[i]; \
break
for (size_t i = 0, e = Values.size(); i != e; ++i) {
@@ -283,8 +283,7 @@ void DIEHash::hashLocList(const DIELocList &LocList) {
// Hash an individual attribute \param Attr based on the type of attribute and
// the form.
void DIEHash::hashAttribute(AttrEntry Attr, dwarf::Tag Tag) {
const DIEValue &Value = Attr.Val;
void DIEHash::hashAttribute(DIEValue Value, dwarf::Tag Tag) {
dwarf::Attribute Attribute = Value.getAttribute();
// Other attribute values use the letter 'A' as the marker, and the value
@@ -368,7 +367,7 @@ void DIEHash::hashAttribute(AttrEntry Attr, dwarf::Tag Tag) {
void DIEHash::hashAttributes(const DIEAttrs &Attrs, dwarf::Tag Tag) {
#define ADD_ATTR(ATTR) \
{ \
if (ATTR.Val) \
if (ATTR) \
hashAttribute(ATTR, Tag); \
}