mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-28 06:32:09 +00:00
eliminate the elem_* iterator stuff from NamedMDNode.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92208 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
c5e08a9639
commit
a327524b69
@ -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) {
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user