[llvm] r188254 - Pass DIEHash::collectAttributes output argument by-pointer instead of by-value.
Evgeniy Stepanov
eugeni.stepanov at gmail.com
Tue Aug 13 00:57:01 PDT 2013
Author: eugenis
Date: Tue Aug 13 02:57:01 2013
New Revision: 188254
URL: http://llvm.org/viewvc/llvm-project?rev=188254&view=rev
Log:
Pass DIEHash::collectAttributes output argument by-pointer instead of by-value.
Before this, collectAttributes() was operating on a local object.
Modified:
llvm/trunk/lib/CodeGen/AsmPrinter/DIEHash.cpp
llvm/trunk/lib/CodeGen/AsmPrinter/DIEHash.h
llvm/trunk/test/DebugInfo/X86/fission-hash.ll
Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DIEHash.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DIEHash.cpp?rev=188254&r1=188253&r2=188254&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DIEHash.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DIEHash.cpp Tue Aug 13 02:57:01 2013
@@ -103,13 +103,13 @@ void DIEHash::addParentContext(DIE *Pare
}
// 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 At
void DIEHash::addAttributes(DIE *Die) {
DIEAttrs Attrs;
memset(&Attrs, 0, sizeof(Attrs));
- collectAttributes(Die, Attrs);
+ collectAttributes(Die, &Attrs);
hashAttributes(Attrs);
}
Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DIEHash.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DIEHash.h?rev=188254&r1=188253&r2=188254&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DIEHash.h (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DIEHash.h Tue Aug 13 02:57:01 2013
@@ -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);
Modified: llvm/trunk/test/DebugInfo/X86/fission-hash.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/X86/fission-hash.ll?rev=188254&r1=188253&r2=188254&view=diff
==============================================================================
--- llvm/trunk/test/DebugInfo/X86/fission-hash.ll (original)
+++ llvm/trunk/test/DebugInfo/X86/fission-hash.ll Tue Aug 13 02:57:01 2013
@@ -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}
More information about the llvm-commits
mailing list