summaryrefslogtreecommitdiffstats
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
commitb59d82ac6690f078791ee800cbb58df11c6cf56e (patch)
treef0b3c4956af9ad7b628bf44a045f2ea6d4d4c377
parent301d0171397521ed030cead1c0661681a504df85 (diff)
downloadbcm5719-llvm-b59d82ac6690f078791ee800cbb58df11c6cf56e.tar.gz
bcm5719-llvm-b59d82ac6690f078791ee800cbb58df11c6cf56e.zip
Pass DIEHash::collectAttributes output argument by-pointer instead of by-value.
Before this, collectAttributes() was operating on a local object. llvm-svn: 188254
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DIEHash.cpp8
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DIEHash.h2
-rw-r--r--llvm/test/DebugInfo/X86/fission-hash.ll4
3 files changed, 7 insertions, 7 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DIEHash.cpp b/llvm/lib/CodeGen/AsmPrinter/DIEHash.cpp
index c9c4541e93e..e1166116735 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DIEHash.cpp
+++ b/llvm/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/llvm/lib/CodeGen/AsmPrinter/DIEHash.h b/llvm/lib/CodeGen/AsmPrinter/DIEHash.h
index 3c025bb58ee..0c7d6e25d5f 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DIEHash.h
+++ b/llvm/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/llvm/test/DebugInfo/X86/fission-hash.ll b/llvm/test/DebugInfo/X86/fission-hash.ll
index 8ece061ba78..f0fe0d4cd5b 100644
--- a/llvm/test/DebugInfo/X86/fission-hash.ll
+++ b/llvm/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}
OpenPOWER on IntegriCloud