summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter/DIEHash.cpp
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2013-08-14 22:23:05 +0000
committerDavid Blaikie <dblaikie@gmail.com>2013-08-14 22:23:05 +0000
commitd0d6fcc923f062fc388ebe98fc074d61e9c2320f (patch)
tree142dd8387374b6ab18a2adeccd0cc0778c324bc6 /llvm/lib/CodeGen/AsmPrinter/DIEHash.cpp
parent3494b7ee426bef722baf0b28d19ca82e951b05f7 (diff)
downloadbcm5719-llvm-d0d6fcc923f062fc388ebe98fc074d61e9c2320f.tar.gz
bcm5719-llvm-d0d6fcc923f062fc388ebe98fc074d61e9c2320f.zip
DebugInfo: Prefer references over pointers, pass by const reference for a type that will grow in the future
llvm-svn: 188422
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/DIEHash.cpp')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DIEHash.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DIEHash.cpp b/llvm/lib/CodeGen/AsmPrinter/DIEHash.cpp
index e1166116735..f0ab38c3d4e 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: "
@@ -150,7 +150,7 @@ void DIEHash::hashAttribute(AttrEntry Attr) {
// Go through the attributes from \param Attrs in the order specified in 7.27.4
// and hash them.
-void DIEHash::hashAttributes(DIEAttrs Attrs) {
+void DIEHash::hashAttributes(const DIEAttrs &Attrs) {
#define ADD_ATTR(ATTR) \
{ \
if (ATTR.Val != 0) \
@@ -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);
}
OpenPOWER on IntegriCloud