mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-25 00:29:20 +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));
|
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:
|
/// Methods for support type inquiry through isa, cast, and dyn_cast:
|
||||||
static inline bool classof(const NamedMDNode *) { return true; }
|
static inline bool classof(const NamedMDNode *) { return true; }
|
||||||
static bool classof(const Value *V) {
|
static bool classof(const Value *V) {
|
||||||
|
@ -226,11 +226,8 @@ void ValueEnumerator::EnumerateMetadata(const MetadataBase *MD) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (const NamedMDNode *N = dyn_cast<NamedMDNode>(MD)) {
|
if (const NamedMDNode *N = dyn_cast<NamedMDNode>(MD)) {
|
||||||
for(NamedMDNode::const_elem_iterator I = N->elem_begin(),
|
for (unsigned i = 0, e = N->getNumElements(); i != e; ++i)
|
||||||
E = N->elem_end(); I != E; ++I) {
|
EnumerateValue(N->getElement(i));
|
||||||
MetadataBase *M = *I;
|
|
||||||
EnumerateValue(M);
|
|
||||||
}
|
|
||||||
MDValues.push_back(std::make_pair(MD, 1U));
|
MDValues.push_back(std::make_pair(MD, 1U));
|
||||||
MDValueMap[MD] = Values.size();
|
MDValueMap[MD] = Values.size();
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user