From d39c594d39df7f283c2fb8a704a3f31c501180d9 Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Fri, 17 Sep 2010 15:48:55 +0000 Subject: Vendor import of llvm r114020 (from the release_28 branch): http://llvm.org/svn/llvm-project/llvm/branches/release_28@114020 Approved by: rpaulo (mentor) --- include/llvm/Analysis/AliasSetTracker.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'include/llvm/Analysis/AliasSetTracker.h') diff --git a/include/llvm/Analysis/AliasSetTracker.h b/include/llvm/Analysis/AliasSetTracker.h index 09f12ad281ac6..8e2f7fd29a311 100644 --- a/include/llvm/Analysis/AliasSetTracker.h +++ b/include/llvm/Analysis/AliasSetTracker.h @@ -92,7 +92,8 @@ class AliasSet : public ilist_node { AliasSet *Forward; // Forwarding pointer. AliasSet *Next, *Prev; // Doubly linked list of AliasSets. - std::vector CallSites; // All calls & invokes in this alias set. + // All calls & invokes in this alias set. + std::vector > 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 { 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(); } -- cgit v1.2.3