AsmPrinter: Stop exposing underlying DIE children list, NFC

Update `DIE` API to hide the implementation of `DIE::Children` so we can
swap it out.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238468 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Duncan P. N. Exon Smith
2015-05-28 19:56:34 +00:00
parent 48f886b9de
commit 2c7cce70cd
5 changed files with 11 additions and 10 deletions

View File

@@ -496,8 +496,12 @@ public:
unsigned getOffset() const { return Offset; }
unsigned getSize() const { return Size; }
bool hasChildren() const { return !Children.empty(); }
const std::vector<std::unique_ptr<DIE>> &getChildren() const {
return Children;
typedef std::vector<std::unique_ptr<DIE>>::const_iterator child_iterator;
typedef iterator_range<child_iterator> child_range;
child_range children() const {
return llvm::make_range(Children.begin(), Children.end());
}
typedef SmallVectorImpl<DIEValue>::const_iterator value_iterator;