eliminate the elem_* iterator stuff from NamedMDNode.

llvm-svn: 92208
This commit is contained in:
Chris Lattner 2009-12-28 07:57:01 +00:00
parent 74a6ad6f29
commit f1ef03ad4d
2 changed files with 2 additions and 14 deletions

View File

@ -203,15 +203,6 @@ public:
Node.push_back(TrackingVH<MetadataBase>(M));
}
typedef SmallVectorImpl<TrackingVH<MetadataBase> >::iterator elem_iterator;
typedef SmallVectorImpl<TrackingVH<MetadataBase> >::const_iterator
const_elem_iterator;
bool elem_empty() const { return Node.empty(); }
const_elem_iterator elem_begin() const { return Node.begin(); }
const_elem_iterator elem_end() const { return Node.end(); }
elem_iterator elem_begin() { return Node.begin(); }
elem_iterator elem_end() { return Node.end(); }
/// Methods for support type inquiry through isa, cast, and dyn_cast:
static inline bool classof(const NamedMDNode *) { return true; }
static bool classof(const Value *V) {

View File

@ -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;