summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorEric Christopher <echristo@gmail.com>2013-08-28 00:10:38 +0000
committerEric Christopher <echristo@gmail.com>2013-08-28 00:10:38 +0000
commitd033d6fb880b58528fe8e020602ca926290064eb (patch)
tree3b48c8ee9eed2ad33691f912ed61316a4145247d /llvm/lib/CodeGen
parent2894000b484a62dc174d6f0773dd918b203c27a1 (diff)
downloadbcm5719-llvm-d033d6fb880b58528fe8e020602ca926290064eb.tar.gz
bcm5719-llvm-d033d6fb880b58528fe8e020602ca926290064eb.zip
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. llvm-svn: 189427
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DIEHash.cpp11
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DIEHash.h1
2 files changed, 12 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DIEHash.cpp b/llvm/lib/CodeGen/AsmPrinter/DIEHash.cpp
index f0ab38c3d4e..1322743247e 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DIEHash.cpp
+++ b/llvm/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/llvm/lib/CodeGen/AsmPrinter/DIEHash.h b/llvm/lib/CodeGen/AsmPrinter/DIEHash.h
index f53529c54f1..d83f78f68b4 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DIEHash.h
+++ b/llvm/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:
OpenPOWER on IntegriCloud