diff options
Diffstat (limited to 'include/llvm/Analysis/AliasSetTracker.h')
-rw-r--r-- | include/llvm/Analysis/AliasSetTracker.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/include/llvm/Analysis/AliasSetTracker.h b/include/llvm/Analysis/AliasSetTracker.h index 09f12ad281ac..8e2f7fd29a31 100644 --- a/include/llvm/Analysis/AliasSetTracker.h +++ b/include/llvm/Analysis/AliasSetTracker.h @@ -92,7 +92,8 @@ class AliasSet : public ilist_node<AliasSet> { AliasSet *Forward; // Forwarding pointer. AliasSet *Next, *Prev; // Doubly linked list of AliasSets. - std::vector<CallSite> CallSites; // All calls & invokes in this alias set. + // All calls & invokes in this alias set. + std::vector<AssertingVH<Instruction> > CallSites; // RefCount - Number of nodes pointing to this AliasSet plus the number of // AliasSets forwarding to it. @@ -127,6 +128,11 @@ class AliasSet : public ilist_node<AliasSet> { removeFromTracker(AST); } + CallSite getCallSite(unsigned i) const { + assert(i < CallSites.size()); + return CallSite(CallSites[i]); + } + public: /// Accessors... bool isRef() const { return AccessTy & Refs; } @@ -229,7 +235,7 @@ private: void addCallSite(CallSite CS, AliasAnalysis &AA); void removeCallSite(CallSite CS) { for (size_t i = 0, e = CallSites.size(); i != e; ++i) - if (CallSites[i].getInstruction() == CS.getInstruction()) { + if (CallSites[i] == CS.getInstruction()) { CallSites[i] = CallSites.back(); CallSites.pop_back(); } |