diff options
author | Chris Lattner <sabre@nondot.org> | 2009-12-28 07:57:01 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-12-28 07:57:01 +0000 |
commit | f1ef03ad4d192f6355fe12ce502c1dab9973117b (patch) | |
tree | 9f2af673df494125ac3e9d82b90e7726d5fe6346 /llvm/lib/Bitcode/Writer/ValueEnumerator.cpp | |
parent | 74a6ad6f295b323bcc0661c1446c527976f6cff2 (diff) | |
download | bcm5719-llvm-f1ef03ad4d192f6355fe12ce502c1dab9973117b.tar.gz bcm5719-llvm-f1ef03ad4d192f6355fe12ce502c1dab9973117b.zip |
eliminate the elem_* iterator stuff from NamedMDNode.
llvm-svn: 92208
Diffstat (limited to 'llvm/lib/Bitcode/Writer/ValueEnumerator.cpp')
-rw-r--r-- | llvm/lib/Bitcode/Writer/ValueEnumerator.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/llvm/lib/Bitcode/Writer/ValueEnumerator.cpp b/llvm/lib/Bitcode/Writer/ValueEnumerator.cpp index d840d4ae9fe..d5b810c8544 100644 --- a/llvm/lib/Bitcode/Writer/ValueEnumerator.cpp +++ b/llvm/lib/Bitcode/Writer/ValueEnumerator.cpp @@ -226,11 +226,8 @@ void ValueEnumerator::EnumerateMetadata(const MetadataBase *MD) { } if (const NamedMDNode *N = dyn_cast<NamedMDNode>(MD)) { - for(NamedMDNode::const_elem_iterator I = N->elem_begin(), - E = N->elem_end(); I != E; ++I) { - MetadataBase *M = *I; - EnumerateValue(M); - } + for (unsigned i = 0, e = N->getNumElements(); i != e; ++i) + EnumerateValue(N->getElement(i)); MDValues.push_back(std::make_pair(MD, 1U)); MDValueMap[MD] = Values.size(); return; |