Convert typerec to be a structure instead of a pair
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4226 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Analysis/DataStructure/DataStructure.cpp b/lib/Analysis/DataStructure/DataStructure.cpp
index 2313cd0..e7e4010 100644
--- a/lib/Analysis/DataStructure/DataStructure.cpp
+++ b/lib/Analysis/DataStructure/DataStructure.cpp
@@ -61,7 +61,7 @@
}
}
- TypeEntries.push_back(std::make_pair(T, 0));
+ TypeEntries.push_back(TypeRec(T, 0));
}
// DSNode copy constructor... do not copy over the referrers list!
@@ -323,9 +323,9 @@
// If this merging into node has more than just void nodes in it, merge!
assert(!N->TypeEntries.empty() && "TypeEntries is empty for a node?");
- if (N->TypeEntries.size() != 1 || N->TypeEntries[0].first != Type::VoidTy) {
+ if (N->TypeEntries.size() != 1 || N->TypeEntries[0].Ty != Type::VoidTy) {
// If the current node just has a Void entry in it, remove it.
- if (TypeEntries.size() == 1 && TypeEntries[0].first == Type::VoidTy)
+ if (TypeEntries.size() == 1 && TypeEntries[0].Ty == Type::VoidTy)
TypeEntries.clear();
// Adjust all of the type entries we are merging in by the offset... and add
@@ -334,7 +334,7 @@
if (NOffset != 0) { // This case is common enough to optimize for
// Offset all of the TypeEntries in N with their new offset
for (unsigned i = 0, e = N->TypeEntries.size(); i != e; ++i)
- N->TypeEntries[i].second += NOffset;
+ N->TypeEntries[i].Offset += NOffset;
}
MergeSortedVectors(TypeEntries, N->TypeEntries);