summaryrefslogtreecommitdiff
path: root/lib/CodeGen/AsmPrinter/DIEHash.cpp
diff options
context:
space:
mode:
authorEric Christopher <echristo@gmail.com>2014-03-06 18:59:42 +0000
committerEric Christopher <echristo@gmail.com>2014-03-06 18:59:42 +0000
commit6c43168ce3b50e1a1e881e07f18aa4a31555d7a5 (patch)
tree8ab3bd4ca85165740e42dd57e37285dd71ca331f /lib/CodeGen/AsmPrinter/DIEHash.cpp
parentd25733bebcccb671e5b33283eabdf6d0a66ee5db (diff)
downloadllvm-6c43168ce3b50e1a1e881e07f18aa4a31555d7a5.tar.gz
llvm-6c43168ce3b50e1a1e881e07f18aa4a31555d7a5.tar.bz2
llvm-6c43168ce3b50e1a1e881e07f18aa4a31555d7a5.tar.xz
Move DIEEntry handling inside the main switch statement.
No functional change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203142 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/AsmPrinter/DIEHash.cpp')
-rw-r--r--lib/CodeGen/AsmPrinter/DIEHash.cpp16
1 files changed, 6 insertions, 10 deletions
diff --git a/lib/CodeGen/AsmPrinter/DIEHash.cpp b/lib/CodeGen/AsmPrinter/DIEHash.cpp
index ea0c1cf7cb..cff8f2180a 100644
--- a/lib/CodeGen/AsmPrinter/DIEHash.cpp
+++ b/lib/CodeGen/AsmPrinter/DIEHash.cpp
@@ -286,14 +286,6 @@ void DIEHash::hashAttribute(AttrEntry Attr, dwarf::Tag Tag) {
const DIEAbbrevData *Desc = Attr.Desc;
dwarf::Attribute Attribute = Desc->getAttribute();
- // 7.27 Step 3
- // ... An attribute that refers to another type entry T is processed as
- // follows:
- if (const DIEEntry *EntryAttr = dyn_cast<DIEEntry>(Value)) {
- hashDIEEntry(Attribute, Tag, *EntryAttr->getEntry());
- return;
- }
-
// Other attribute values use the letter 'A' as the marker, and the value
// consists of the form code (encoded as an unsigned LEB128 value) followed by
// the encoding of the value according to the form code. To ensure
@@ -302,6 +294,12 @@ void DIEHash::hashAttribute(AttrEntry Attr, dwarf::Tag Tag) {
// DW_FORM_string, and DW_FORM_block.
switch (Value->getType()) {
+ // 7.27 Step 3
+ // ... An attribute that refers to another type entry T is processed as
+ // follows:
+ case DIEValue::isEntry:
+ hashDIEEntry(Attribute, Tag, *cast<DIEEntry>(Value)->getEntry());
+ break;
case DIEValue::isInteger: {
addULEB128('A');
addULEB128(Attribute);
@@ -352,8 +350,6 @@ void DIEHash::hashAttribute(AttrEntry Attr, dwarf::Tag Tag) {
case DIEValue::isExpr:
case DIEValue::isLabel:
case DIEValue::isDelta:
- // These two were handled above.
- case DIEValue::isEntry:
case DIEValue::isTypeSignature:
llvm_unreachable("Add support for additional value types.");
}