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 | 15ab9f4aaa0bebe50c1367963c409d929bede030 (patch) | |
tree | b873ccdb14a9eb8c21db1693d84fd8a0c6a9dd83 /lib/CodeGen/AsmPrinter/DIEHash.cpp | |
parent | 6aa9315353574c000c5f2aa0edd34067e94b8c79 (diff) | |
download | llvm-15ab9f4aaa0bebe50c1367963c409d929bede030.tar.gz llvm-15ab9f4aaa0bebe50c1367963c409d929bede030.tar.bz2 llvm-15ab9f4aaa0bebe50c1367963c409d929bede030.tar.xz |
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
Diffstat (limited to 'lib/CodeGen/AsmPrinter/DIEHash.cpp')
-rw-r--r-- | lib/CodeGen/AsmPrinter/DIEHash.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/CodeGen/AsmPrinter/DIEHash.cpp b/lib/CodeGen/AsmPrinter/DIEHash.cpp index c9c4541e93..e116611673 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); } |