diff options
Diffstat (limited to 'lib/Analysis/DataStructure')
-rw-r--r-- | lib/Analysis/DataStructure/DataStructure.cpp | 8 | ||||
-rw-r--r-- | lib/Analysis/DataStructure/Local.cpp | 1 | ||||
-rw-r--r-- | lib/Analysis/DataStructure/Printer.cpp | 6 |
3 files changed, 7 insertions, 8 deletions
diff --git a/lib/Analysis/DataStructure/DataStructure.cpp b/lib/Analysis/DataStructure/DataStructure.cpp index 2313cd09e8..e7e40108c6 100644 --- a/lib/Analysis/DataStructure/DataStructure.cpp +++ b/lib/Analysis/DataStructure/DataStructure.cpp @@ -61,7 +61,7 @@ DSNode::DSNode(enum NodeTy NT, const Type *T) : NodeType(NT) { } } - 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 @@ void DSNode::mergeWith(const DSNodeHandle &NH, unsigned Offset) { // 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 @@ void DSNode::mergeWith(const DSNodeHandle &NH, unsigned Offset) { 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); diff --git a/lib/Analysis/DataStructure/Local.cpp b/lib/Analysis/DataStructure/Local.cpp index 43fd5a4a54..b27652379e 100644 --- a/lib/Analysis/DataStructure/Local.cpp +++ b/lib/Analysis/DataStructure/Local.cpp @@ -413,4 +413,3 @@ bool LocalDataStructures::run(Module &M) { DSInfo.insert(std::make_pair(I, new DSGraph(*I))); return false; } - diff --git a/lib/Analysis/DataStructure/Printer.cpp b/lib/Analysis/DataStructure/Printer.cpp index 8b29c1c6c0..7539aac102 100644 --- a/lib/Analysis/DataStructure/Printer.cpp +++ b/lib/Analysis/DataStructure/Printer.cpp @@ -28,9 +28,9 @@ static string getCaption(const DSNode *N, const DSGraph *G) { Module *M = G && &G->getFunction() ? G->getFunction().getParent() : 0; for (unsigned i = 0, e = N->getTypeEntries().size(); i != e; ++i) { - WriteTypeSymbolic(OS, N->getTypeEntries()[i].first, M); - if (N->getTypeEntries()[i].second) - OS << "@" << N->getTypeEntries()[i].second; + WriteTypeSymbolic(OS, N->getTypeEntries()[i].Ty, M); + if (N->getTypeEntries()[i].Offset) + OS << "@" << N->getTypeEntries()[i].Offset; OS << "\n"; } |