[llvm] r189427 - Add support for DW_FORM_dataN and DW_FORM_udata to the DIE hashing
Eric Christopher
echristo at gmail.com
Tue Aug 27 17:10:39 PDT 2013
Author: echristo
Date: Tue Aug 27 19:10:38 2013
New Revision: 189427
URL: http://llvm.org/viewvc/llvm-project?rev=189427&view=rev
Log:
Add support for DW_FORM_dataN and DW_FORM_udata to the DIE hashing
algorithm. Update the split dwarf hashing testcase accordingly - this
should be the last time that the hash of an empty file changes.
Modified:
llvm/trunk/lib/CodeGen/AsmPrinter/DIEHash.cpp
llvm/trunk/lib/CodeGen/AsmPrinter/DIEHash.h
llvm/trunk/test/DebugInfo/X86/fission-hash.ll
Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DIEHash.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DIEHash.cpp?rev=189427&r1=189426&r2=189427&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DIEHash.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DIEHash.cpp Tue Aug 27 19:10:38 2013
@@ -119,6 +119,9 @@ void DIEHash::collectAttributes(DIE *Die
case dwarf::DW_AT_name:
COLLECT_ATTR(DW_AT_name);
break;
+ case dwarf::DW_AT_language:
+ COLLECT_ATTR(DW_AT_language);
+ break;
default:
break;
}
@@ -145,6 +148,13 @@ void DIEHash::hashAttribute(AttrEntry At
case dwarf::DW_FORM_strp:
addString(cast<DIEString>(Value)->getString());
break;
+ case dwarf::DW_FORM_data1:
+ case dwarf::DW_FORM_data2:
+ case dwarf::DW_FORM_data4:
+ case dwarf::DW_FORM_data8:
+ case dwarf::DW_FORM_udata:
+ addULEB128(cast<DIEInteger>(Value)->getValue());
+ break;
}
}
@@ -159,6 +169,7 @@ void DIEHash::hashAttributes(const DIEAt
// FIXME: Add the rest.
ADD_ATTR(Attrs.DW_AT_name);
+ ADD_ATTR(Attrs.DW_AT_language);
}
// Add all of the attributes for \param Die to the hash.
Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DIEHash.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DIEHash.h?rev=189427&r1=189426&r2=189427&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DIEHash.h (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DIEHash.h Tue Aug 27 19:10:38 2013
@@ -29,6 +29,7 @@ class DIEHash {
// Collection of all attributes used in hashing a particular DIE.
struct DIEAttrs {
AttrEntry DW_AT_name;
+ AttrEntry DW_AT_language;
};
public:
Modified: llvm/trunk/test/DebugInfo/X86/fission-hash.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/X86/fission-hash.ll?rev=189427&r1=189426&r2=189427&view=diff
==============================================================================
--- llvm/trunk/test/DebugInfo/X86/fission-hash.ll (original)
+++ llvm/trunk/test/DebugInfo/X86/fission-hash.ll Tue Aug 27 19:10:38 2013
@@ -3,8 +3,8 @@
; The source is an empty file.
-; CHECK: DW_AT_GNU_dwo_id [DW_FORM_data8] (0xa188c11a9264c05d)
-; CHECK: DW_AT_GNU_dwo_id [DW_FORM_data8] (0xa188c11a9264c05d)
+; CHECK: DW_AT_GNU_dwo_id [DW_FORM_data8] (0xc357bdf055b6393d)
+; CHECK: DW_AT_GNU_dwo_id [DW_FORM_data8] (0xc357bdf055b6393d)
!llvm.dbg.cu = !{!0}
!llvm.module.flags = !{!3}
More information about the llvm-commits
mailing list