This is an archive of the discontinued LLVM Phabricator instance.

Add a variant of DWARFDie::find() and DWARFDie::findRecursively() that takes a llvm::ArrayRef<dwarf::Attribute>.
ClosedPublic

Authored by clayborg on Jan 13 2017, 2:30 PM.

Diff Detail

Repository
rL LLVM

Event Timeline

clayborg updated this revision to Diff 84388.Jan 13 2017, 2:30 PM
clayborg retitled this revision from to Add a variant of DWARFDie::find() and DWARFDie::findRecursively() that takes a llvm::ArrayRef<dwarf::Attribute>. .
clayborg updated this object.
aprantl accepted this revision.Jan 13 2017, 2:36 PM
aprantl edited edge metadata.

Fine to commit after addressing in-line comments.

include/llvm/DebugInfo/DWARF/DWARFDie.h
141 ↗(On Diff #84388)

The idiomatic way is to pass an ArrayRef by value. The const is usually omitted, since we also have a MutableArrayRef.

161 ↗(On Diff #84388)

same here.

lib/DebugInfo/DWARF/DWARFDie.cpp
203 ↗(On Diff #84388)

Very nice!

This revision is now accepted and ready to land.Jan 13 2017, 2:36 PM
This revision was automatically updated to reflect the committed changes.
chapuni added inline comments.
llvm/trunk/unittests/DebugInfo/DWARF/DWARFDebugInfoTest.cpp
1530

ArrayRef's constructor receives the initializer as temporary object. Fixed in r292127.