diff options
author | Eric Christopher <echristo@gmail.com> | 2013-08-28 00:10:38 +0000 |
---|---|---|
committer | Eric Christopher <echristo@gmail.com> | 2013-08-28 00:10:38 +0000 |
commit | 7ced4fa25778d646b29e1fb92ef8de01d279e57a (patch) | |
tree | 00885bad3b863a8740d2a9dcdd4142888413fc80 /lib | |
parent | 1997734e37775a68182b3fd508a52e0c28ff36f8 (diff) | |
download | external_llvm-7ced4fa25778d646b29e1fb92ef8de01d279e57a.zip external_llvm-7ced4fa25778d646b29e1fb92ef8de01d279e57a.tar.gz external_llvm-7ced4fa25778d646b29e1fb92ef8de01d279e57a.tar.bz2 |
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189427 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/CodeGen/AsmPrinter/DIEHash.cpp | 11 | ||||
-rw-r--r-- | lib/CodeGen/AsmPrinter/DIEHash.h | 1 |
2 files changed, 12 insertions, 0 deletions
diff --git a/lib/CodeGen/AsmPrinter/DIEHash.cpp b/lib/CodeGen/AsmPrinter/DIEHash.cpp index f0ab38c..1322743 100644 --- a/lib/CodeGen/AsmPrinter/DIEHash.cpp +++ b/lib/CodeGen/AsmPrinter/DIEHash.cpp @@ -119,6 +119,9 @@ void DIEHash::collectAttributes(DIE *Die, DIEAttrs &Attrs) { 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 Attr) { 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 DIEAttrs &Attrs) { // 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. diff --git a/lib/CodeGen/AsmPrinter/DIEHash.h b/lib/CodeGen/AsmPrinter/DIEHash.h index f53529c..d83f78f 100644 --- a/lib/CodeGen/AsmPrinter/DIEHash.h +++ b/lib/CodeGen/AsmPrinter/DIEHash.h @@ -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: |