aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEvgeniy Stepanov <eugeni.stepanov@gmail.com>2013-08-13 07:57:01 +0000
committerEvgeniy Stepanov <eugeni.stepanov@gmail.com>2013-08-13 07:57:01 +0000
commit15ab9f4aaa0bebe50c1367963c409d929bede030 (patch)
treeb873ccdb14a9eb8c21db1693d84fd8a0c6a9dd83
parent6aa9315353574c000c5f2aa0edd34067e94b8c79 (diff)
downloadexternal_llvm-15ab9f4aaa0bebe50c1367963c409d929bede030.zip
external_llvm-15ab9f4aaa0bebe50c1367963c409d929bede030.tar.gz
external_llvm-15ab9f4aaa0bebe50c1367963c409d929bede030.tar.bz2
Pass DIEHash::collectAttributes output argument by-pointer instead of by-value.
Before this, collectAttributes() was operating on a local object. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188254 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/CodeGen/AsmPrinter/DIEHash.cpp8
-rw-r--r--lib/CodeGen/AsmPrinter/DIEHash.h2
-rw-r--r--test/DebugInfo/X86/fission-hash.ll4
3 files changed, 7 insertions, 7 deletions
diff --git a/lib/CodeGen/AsmPrinter/DIEHash.cpp b/lib/CodeGen/AsmPrinter/DIEHash.cpp
index c9c4541..e116611 100644
--- a/lib/CodeGen/AsmPrinter/DIEHash.cpp
+++ b/lib/CodeGen/AsmPrinter/DIEHash.cpp
@@ -103,13 +103,13 @@ void DIEHash::addParentContext(DIE *Parent) {
}
// Collect all of the attributes for a particular DIE in single structure.
-void DIEHash::collectAttributes(DIE *Die, DIEAttrs Attrs) {
+void DIEHash::collectAttributes(DIE *Die, DIEAttrs *Attrs) {
const SmallVectorImpl<DIEValue *> &Values = Die->getValues();
const DIEAbbrev &Abbrevs = Die->getAbbrev();
#define COLLECT_ATTR(NAME) \
- Attrs.NAME.Val = Values[i]; \
- Attrs.NAME.Desc = &Abbrevs.getData()[i];
+ Attrs->NAME.Val = Values[i]; \
+ Attrs->NAME.Desc = &Abbrevs.getData()[i];
for (size_t i = 0, e = Values.size(); i != e; ++i) {
DEBUG(dbgs() << "Attribute: "
@@ -165,7 +165,7 @@ void DIEHash::hashAttributes(DIEAttrs Attrs) {
void DIEHash::addAttributes(DIE *Die) {
DIEAttrs Attrs;
memset(&Attrs, 0, sizeof(Attrs));
- collectAttributes(Die, Attrs);
+ collectAttributes(Die, &Attrs);
hashAttributes(Attrs);
}
diff --git a/lib/CodeGen/AsmPrinter/DIEHash.h b/lib/CodeGen/AsmPrinter/DIEHash.h
index 3c025bb..0c7d6e2 100644
--- a/lib/CodeGen/AsmPrinter/DIEHash.h
+++ b/lib/CodeGen/AsmPrinter/DIEHash.h
@@ -59,7 +59,7 @@ private:
/// \brief Collects the attributes of DIE \param Die into the \param Attrs
/// structure.
- void collectAttributes(DIE *Die, DIEAttrs Attrs);
+ void collectAttributes(DIE *Die, DIEAttrs *Attrs);
/// \brief Hashes the attributes in \param Attrs in order.
void hashAttributes(DIEAttrs Attrs);
diff --git a/test/DebugInfo/X86/fission-hash.ll b/test/DebugInfo/X86/fission-hash.ll
index 8ece061..f0fe0d4 100644
--- a/test/DebugInfo/X86/fission-hash.ll
+++ b/test/DebugInfo/X86/fission-hash.ll
@@ -3,8 +3,8 @@
; The source is an empty file.
-; CHECK: DW_AT_GNU_dwo_id [DW_FORM_data8] (0x356a7d50a77f5177)
-; CHECK: DW_AT_GNU_dwo_id [DW_FORM_data8] (0x356a7d50a77f5177)
+; CHECK: DW_AT_GNU_dwo_id [DW_FORM_data8] (0xa188c11a9264c05d)
+; CHECK: DW_AT_GNU_dwo_id [DW_FORM_data8] (0xa188c11a9264c05d)
!llvm.dbg.cu = !{!0}
!llvm.module.flags = !{!3}