From 9f27074f42f03af640977006dc7c05005fb77991 Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Tue, 21 Sep 2010 21:20:13 +0000 Subject: [PATCH] Add some utility routines. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114483 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/Analysis/AliasAnalysis.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/include/llvm/Analysis/AliasAnalysis.h b/include/llvm/Analysis/AliasAnalysis.h index cae7addd3b0..9b9a9e2ccb6 100644 --- a/include/llvm/Analysis/AliasAnalysis.h +++ b/include/llvm/Analysis/AliasAnalysis.h @@ -97,6 +97,18 @@ public: unsigned S = UnknownSize, const MDNode *N = 0) : Ptr(P), Size(S), TBAATag(N) {} + + Location getWithNewPtr(const Value *NewPtr) const { + Location Copy(*this); + Copy.Ptr = NewPtr; + return Copy; + } + + Location getWithoutTBAATag() const { + Location Copy(*this); + Copy.TBAATag = 0; + return Copy; + } }; /// Alias analysis result - Either we know for sure that it does not alias, we -- 2.34.1