AsmPrinter: Stop exposing underlying DIEValue list, NFC

Change the `DIE` API to hide the implementation of the list of
`DIEValue`s.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238369 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Duncan P. N. Exon Smith
2015-05-27 22:44:06 +00:00
parent 95afdd3a07
commit 636aba5bd1
8 changed files with 53 additions and 55 deletions

View File

@@ -499,7 +499,16 @@ public:
const std::vector<std::unique_ptr<DIE>> &getChildren() const {
return Children;
}
const SmallVectorImpl<DIEValue> &getValues() const { return Values; }
typedef SmallVectorImpl<DIEValue>::const_iterator value_iterator;
typedef iterator_range<value_iterator> value_range;
value_iterator begin_values() const { return Values.begin(); }
value_iterator end_values() const { return Values.end(); }
value_range values() const {
return llvm::make_range(begin_values(), end_values());
}
void setValue(unsigned I, DIEValue New) {
assert(I < Values.size());
Values[I] = New;