diff options
author | Evgeniy Stepanov <eugeni.stepanov@gmail.com> | 2013-08-13 07:57:01 +0000 |
---|---|---|
committer | Evgeniy Stepanov <eugeni.stepanov@gmail.com> | 2013-08-13 07:57:01 +0000 |
commit | b59d82ac6690f078791ee800cbb58df11c6cf56e (patch) | |
tree | f0b3c4956af9ad7b628bf44a045f2ea6d4d4c377 /llvm/lib/CodeGen/AsmPrinter/DIEHash.cpp | |
parent | 301d0171397521ed030cead1c0661681a504df85 (diff) | |
download | bcm5719-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
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/DIEHash.cpp')
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/DIEHash.cpp | 8 |
1 files changed, 4 insertions, 4 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); } |